/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/
"use strict";

var $protobuf = require("protobufjs/minimal");

// Common aliases
var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util;

// Exported root namespace
var $root = $protobuf.roots["default"] || ($protobuf.roots["default"] = {});

$root.ReqUserLogin = (function() {

    /**
     * Properties of a ReqUserLogin.
     * @exports IReqUserLogin
     * @interface IReqUserLogin
     * @property {string|null} [username] ReqUserLogin username
     * @property {string|null} [password] ReqUserLogin password
     * @property {string|null} [ip] ReqUserLogin ip
     * @property {string|null} [deviceId] ReqUserLogin deviceId
     * @property {string|null} [version] ReqUserLogin version
     */

    /**
     * Constructs a new ReqUserLogin.
     * @exports ReqUserLogin
     * @classdesc Represents a ReqUserLogin.
     * @implements IReqUserLogin
     * @constructor
     * @param {IReqUserLogin=} [properties] Properties to set
     */
    function ReqUserLogin(properties) {
        if (properties)
            for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                if (properties[keys[i]] != null)
                    this[keys[i]] = properties[keys[i]];
    }

    /**
     * ReqUserLogin username.
     * @member {string} username
     * @memberof ReqUserLogin
     * @instance
     */
    ReqUserLogin.prototype.username = "";

    /**
     * ReqUserLogin password.
     * @member {string} password
     * @memberof ReqUserLogin
     * @instance
     */
    ReqUserLogin.prototype.password = "";

    /**
     * ReqUserLogin ip.
     * @member {string} ip
     * @memberof ReqUserLogin
     * @instance
     */
    ReqUserLogin.prototype.ip = "";

    /**
     * ReqUserLogin deviceId.
     * @member {string} deviceId
     * @memberof ReqUserLogin
     * @instance
     */
    ReqUserLogin.prototype.deviceId = "";

    /**
     * ReqUserLogin version.
     * @member {string} version
     * @memberof ReqUserLogin
     * @instance
     */
    ReqUserLogin.prototype.version = "";

    /**
     * Creates a new ReqUserLogin instance using the specified properties.
     * @function create
     * @memberof ReqUserLogin
     * @static
     * @param {IReqUserLogin=} [properties] Properties to set
     * @returns {ReqUserLogin} ReqUserLogin instance
     */
    ReqUserLogin.create = function create(properties) {
        return new ReqUserLogin(properties);
    };

    /**
     * Encodes the specified ReqUserLogin message. Does not implicitly {@link ReqUserLogin.verify|verify} messages.
     * @function encode
     * @memberof ReqUserLogin
     * @static
     * @param {IReqUserLogin} message ReqUserLogin message or plain object to encode
     * @param {$protobuf.Writer} [writer] Writer to encode to
     * @returns {$protobuf.Writer} Writer
     */
    ReqUserLogin.encode = function encode(message, writer) {
        if (!writer)
            writer = $Writer.create();
        if (message.username != null && Object.hasOwnProperty.call(message, "username"))
            writer.uint32(/* id 1, wireType 2 =*/10).string(message.username);
        if (message.password != null && Object.hasOwnProperty.call(message, "password"))
            writer.uint32(/* id 2, wireType 2 =*/18).string(message.password);
        if (message.ip != null && Object.hasOwnProperty.call(message, "ip"))
            writer.uint32(/* id 3, wireType 2 =*/26).string(message.ip);
        if (message.deviceId != null && Object.hasOwnProperty.call(message, "deviceId"))
            writer.uint32(/* id 4, wireType 2 =*/34).string(message.deviceId);
        if (message.version != null && Object.hasOwnProperty.call(message, "version"))
            writer.uint32(/* id 10, wireType 2 =*/82).string(message.version);
        return writer;
    };

    /**
     * Encodes the specified ReqUserLogin message, length delimited. Does not implicitly {@link ReqUserLogin.verify|verify} messages.
     * @function encodeDelimited
     * @memberof ReqUserLogin
     * @static
     * @param {IReqUserLogin} message ReqUserLogin message or plain object to encode
     * @param {$protobuf.Writer} [writer] Writer to encode to
     * @returns {$protobuf.Writer} Writer
     */
    ReqUserLogin.encodeDelimited = function encodeDelimited(message, writer) {
        return this.encode(message, writer).ldelim();
    };

    /**
     * Decodes a ReqUserLogin message from the specified reader or buffer.
     * @function decode
     * @memberof ReqUserLogin
     * @static
     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
     * @param {number} [length] Message length if known beforehand
     * @returns {ReqUserLogin} ReqUserLogin
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    ReqUserLogin.decode = function decode(reader, length, error) {
        if (!(reader instanceof $Reader))
            reader = $Reader.create(reader);
        var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ReqUserLogin();
        while (reader.pos < end) {
            var tag = reader.uint32();
            if (tag === error)
                break;
            switch (tag >>> 3) {
            case 1: {
                    message.username = reader.string();
                    break;
                }
            case 2: {
                    message.password = reader.string();
                    break;
                }
            case 3: {
                    message.ip = reader.string();
                    break;
                }
            case 4: {
                    message.deviceId = reader.string();
                    break;
                }
            case 10: {
                    message.version = reader.string();
                    break;
                }
            default:
                reader.skipType(tag & 7);
                break;
            }
        }
        return message;
    };

    /**
     * Decodes a ReqUserLogin message from the specified reader or buffer, length delimited.
     * @function decodeDelimited
     * @memberof ReqUserLogin
     * @static
     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
     * @returns {ReqUserLogin} ReqUserLogin
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    ReqUserLogin.decodeDelimited = function decodeDelimited(reader) {
        if (!(reader instanceof $Reader))
            reader = new $Reader(reader);
        return this.decode(reader, reader.uint32());
    };

    /**
     * Verifies a ReqUserLogin message.
     * @function verify
     * @memberof ReqUserLogin
     * @static
     * @param {Object.<string,*>} message Plain object to verify
     * @returns {string|null} `null` if valid, otherwise the reason why it is not
     */
    ReqUserLogin.verify = function verify(message) {
        if (typeof message !== "object" || message === null)
            return "object expected";
        if (message.username != null && message.hasOwnProperty("username"))
            if (!$util.isString(message.username))
                return "username: string expected";
        if (message.password != null && message.hasOwnProperty("password"))
            if (!$util.isString(message.password))
                return "password: string expected";
        if (message.ip != null && message.hasOwnProperty("ip"))
            if (!$util.isString(message.ip))
                return "ip: string expected";
        if (message.deviceId != null && message.hasOwnProperty("deviceId"))
            if (!$util.isString(message.deviceId))
                return "deviceId: string expected";
        if (message.version != null && message.hasOwnProperty("version"))
            if (!$util.isString(message.version))
                return "version: string expected";
        return null;
    };

    /**
     * Creates a ReqUserLogin message from a plain object. Also converts values to their respective internal types.
     * @function fromObject
     * @memberof ReqUserLogin
     * @static
     * @param {Object.<string,*>} object Plain object
     * @returns {ReqUserLogin} ReqUserLogin
     */
    ReqUserLogin.fromObject = function fromObject(object) {
        if (object instanceof $root.ReqUserLogin)
            return object;
        var message = new $root.ReqUserLogin();
        if (object.username != null)
            message.username = String(object.username);
        if (object.password != null)
            message.password = String(object.password);
        if (object.ip != null)
            message.ip = String(object.ip);
        if (object.deviceId != null)
            message.deviceId = String(object.deviceId);
        if (object.version != null)
            message.version = String(object.version);
        return message;
    };

    /**
     * Creates a plain object from a ReqUserLogin message. Also converts values to other types if specified.
     * @function toObject
     * @memberof ReqUserLogin
     * @static
     * @param {ReqUserLogin} message ReqUserLogin
     * @param {$protobuf.IConversionOptions} [options] Conversion options
     * @returns {Object.<string,*>} Plain object
     */
    ReqUserLogin.toObject = function toObject(message, options) {
        if (!options)
            options = {};
        var object = {};
        if (options.defaults) {
            object.username = "";
            object.password = "";
            object.ip = "";
            object.deviceId = "";
            object.version = "";
        }
        if (message.username != null && message.hasOwnProperty("username"))
            object.username = message.username;
        if (message.password != null && message.hasOwnProperty("password"))
            object.password = message.password;
        if (message.ip != null && message.hasOwnProperty("ip"))
            object.ip = message.ip;
        if (message.deviceId != null && message.hasOwnProperty("deviceId"))
            object.deviceId = message.deviceId;
        if (message.version != null && message.hasOwnProperty("version"))
            object.version = message.version;
        return object;
    };

    /**
     * Converts this ReqUserLogin to JSON.
     * @function toJSON
     * @memberof ReqUserLogin
     * @instance
     * @returns {Object.<string,*>} JSON object
     */
    ReqUserLogin.prototype.toJSON = function toJSON() {
        return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
    };

    /**
     * Gets the default type url for ReqUserLogin
     * @function getTypeUrl
     * @memberof ReqUserLogin
     * @static
     * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
     * @returns {string} The default type url
     */
    ReqUserLogin.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
        if (typeUrlPrefix === undefined) {
            typeUrlPrefix = "type.googleapis.com";
        }
        return typeUrlPrefix + "/ReqUserLogin";
    };

    return ReqUserLogin;
})();

$root.RspUserLogin = (function() {

    /**
     * Properties of a RspUserLogin.
     * @exports IRspUserLogin
     * @interface IRspUserLogin
     * @property {ErrCode|null} [code] RspUserLogin code
     * @property {Long|null} [userId] RspUserLogin userId
     * @property {string|null} [token] RspUserLogin token
     */

    /**
     * Constructs a new RspUserLogin.
     * @exports RspUserLogin
     * @classdesc Represents a RspUserLogin.
     * @implements IRspUserLogin
     * @constructor
     * @param {IRspUserLogin=} [properties] Properties to set
     */
    function RspUserLogin(properties) {
        if (properties)
            for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                if (properties[keys[i]] != null)
                    this[keys[i]] = properties[keys[i]];
    }

    /**
     * RspUserLogin code.
     * @member {ErrCode} code
     * @memberof RspUserLogin
     * @instance
     */
    RspUserLogin.prototype.code = 0;

    /**
     * RspUserLogin userId.
     * @member {Long} userId
     * @memberof RspUserLogin
     * @instance
     */
    RspUserLogin.prototype.userId = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

    /**
     * RspUserLogin token.
     * @member {string} token
     * @memberof RspUserLogin
     * @instance
     */
    RspUserLogin.prototype.token = "";

    /**
     * Creates a new RspUserLogin instance using the specified properties.
     * @function create
     * @memberof RspUserLogin
     * @static
     * @param {IRspUserLogin=} [properties] Properties to set
     * @returns {RspUserLogin} RspUserLogin instance
     */
    RspUserLogin.create = function create(properties) {
        return new RspUserLogin(properties);
    };

    /**
     * Encodes the specified RspUserLogin message. Does not implicitly {@link RspUserLogin.verify|verify} messages.
     * @function encode
     * @memberof RspUserLogin
     * @static
     * @param {IRspUserLogin} message RspUserLogin message or plain object to encode
     * @param {$protobuf.Writer} [writer] Writer to encode to
     * @returns {$protobuf.Writer} Writer
     */
    RspUserLogin.encode = function encode(message, writer) {
        if (!writer)
            writer = $Writer.create();
        if (message.code != null && Object.hasOwnProperty.call(message, "code"))
            writer.uint32(/* id 1, wireType 0 =*/8).int32(message.code);
        if (message.userId != null && Object.hasOwnProperty.call(message, "userId"))
            writer.uint32(/* id 2, wireType 0 =*/16).int64(message.userId);
        if (message.token != null && Object.hasOwnProperty.call(message, "token"))
            writer.uint32(/* id 3, wireType 2 =*/26).string(message.token);
        return writer;
    };

    /**
     * Encodes the specified RspUserLogin message, length delimited. Does not implicitly {@link RspUserLogin.verify|verify} messages.
     * @function encodeDelimited
     * @memberof RspUserLogin
     * @static
     * @param {IRspUserLogin} message RspUserLogin message or plain object to encode
     * @param {$protobuf.Writer} [writer] Writer to encode to
     * @returns {$protobuf.Writer} Writer
     */
    RspUserLogin.encodeDelimited = function encodeDelimited(message, writer) {
        return this.encode(message, writer).ldelim();
    };

    /**
     * Decodes a RspUserLogin message from the specified reader or buffer.
     * @function decode
     * @memberof RspUserLogin
     * @static
     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
     * @param {number} [length] Message length if known beforehand
     * @returns {RspUserLogin} RspUserLogin
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    RspUserLogin.decode = function decode(reader, length, error) {
        if (!(reader instanceof $Reader))
            reader = $Reader.create(reader);
        var end = length === undefined ? reader.len : reader.pos + length, message = new $root.RspUserLogin();
        while (reader.pos < end) {
            var tag = reader.uint32();
            if (tag === error)
                break;
            switch (tag >>> 3) {
            case 1: {
                    message.code = reader.int32();
                    break;
                }
            case 2: {
                    message.userId = reader.int64();
                    break;
                }
            case 3: {
                    message.token = reader.string();
                    break;
                }
            default:
                reader.skipType(tag & 7);
                break;
            }
        }
        return message;
    };

    /**
     * Decodes a RspUserLogin message from the specified reader or buffer, length delimited.
     * @function decodeDelimited
     * @memberof RspUserLogin
     * @static
     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
     * @returns {RspUserLogin} RspUserLogin
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    RspUserLogin.decodeDelimited = function decodeDelimited(reader) {
        if (!(reader instanceof $Reader))
            reader = new $Reader(reader);
        return this.decode(reader, reader.uint32());
    };

    /**
     * Verifies a RspUserLogin message.
     * @function verify
     * @memberof RspUserLogin
     * @static
     * @param {Object.<string,*>} message Plain object to verify
     * @returns {string|null} `null` if valid, otherwise the reason why it is not
     */
    RspUserLogin.verify = function verify(message) {
        if (typeof message !== "object" || message === null)
            return "object expected";
        if (message.code != null && message.hasOwnProperty("code"))
            switch (message.code) {
            default:
                return "code: enum value expected";
            case 0:
            case 1:
            case 2:
            case 100:
            case 102:
            case 103:
            case 104:
            case 110:
            case 115:
            case 120:
            case 125:
            case 126:
            case 127:
            case 500:
            case 505:
                break;
            }
        if (message.userId != null && message.hasOwnProperty("userId"))
            if (!$util.isInteger(message.userId) && !(message.userId && $util.isInteger(message.userId.low) && $util.isInteger(message.userId.high)))
                return "userId: integer|Long expected";
        if (message.token != null && message.hasOwnProperty("token"))
            if (!$util.isString(message.token))
                return "token: string expected";
        return null;
    };

    /**
     * Creates a RspUserLogin message from a plain object. Also converts values to their respective internal types.
     * @function fromObject
     * @memberof RspUserLogin
     * @static
     * @param {Object.<string,*>} object Plain object
     * @returns {RspUserLogin} RspUserLogin
     */
    RspUserLogin.fromObject = function fromObject(object) {
        if (object instanceof $root.RspUserLogin)
            return object;
        var message = new $root.RspUserLogin();
        switch (object.code) {
        default:
            if (typeof object.code === "number") {
                message.code = object.code;
                break;
            }
            break;
        case "OK":
        case 0:
            message.code = 0;
            break;
        case "SystemErr":
        case 1:
            message.code = 1;
            break;
        case "ParamErr":
        case 2:
            message.code = 2;
            break;
        case "LoginDiffLoc":
        case 100:
            message.code = 100;
            break;
        case "LoginUserOrPwdErr":
        case 102:
            message.code = 102;
            break;
        case "AccountFrozen":
        case 103:
            message.code = 103;
            break;
        case "AccountBanned":
        case 104:
            message.code = 104;
            break;
        case "RegisterUserExist":
        case 110:
            message.code = 110;
            break;
        case "VersionTooLow":
        case 115:
            message.code = 115;
            break;
        case "Maintain":
        case 120:
            message.code = 120;
            break;
        case "GoldNotEnough":
        case 125:
            message.code = 125;
            break;
        case "NotBetCount":
        case 126:
            message.code = 126;
            break;
        case "NotLeaveRoom":
        case 127:
            message.code = 127;
            break;
        case "TotalBetExceedsLimit":
        case 500:
            message.code = 500;
            break;
        case "AreaBetExceedsLimit":
        case 505:
            message.code = 505;
            break;
        }
        if (object.userId != null)
            if ($util.Long)
                (message.userId = $util.Long.fromValue(object.userId)).unsigned = false;
            else if (typeof object.userId === "string")
                message.userId = parseInt(object.userId, 10);
            else if (typeof object.userId === "number")
                message.userId = object.userId;
            else if (typeof object.userId === "object")
                message.userId = new $util.LongBits(object.userId.low >>> 0, object.userId.high >>> 0).toNumber();
        if (object.token != null)
            message.token = String(object.token);
        return message;
    };

    /**
     * Creates a plain object from a RspUserLogin message. Also converts values to other types if specified.
     * @function toObject
     * @memberof RspUserLogin
     * @static
     * @param {RspUserLogin} message RspUserLogin
     * @param {$protobuf.IConversionOptions} [options] Conversion options
     * @returns {Object.<string,*>} Plain object
     */
    RspUserLogin.toObject = function toObject(message, options) {
        if (!options)
            options = {};
        var object = {};
        if (options.defaults) {
            object.code = options.enums === String ? "OK" : 0;
            if ($util.Long) {
                var long = new $util.Long(0, 0, false);
                object.userId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
            } else
                object.userId = options.longs === String ? "0" : 0;
            object.token = "";
        }
        if (message.code != null && message.hasOwnProperty("code"))
            object.code = options.enums === String ? $root.ErrCode[message.code] === undefined ? message.code : $root.ErrCode[message.code] : message.code;
        if (message.userId != null && message.hasOwnProperty("userId"))
            if (typeof message.userId === "number")
                object.userId = options.longs === String ? String(message.userId) : message.userId;
            else
                object.userId = options.longs === String ? $util.Long.prototype.toString.call(message.userId) : options.longs === Number ? new $util.LongBits(message.userId.low >>> 0, message.userId.high >>> 0).toNumber() : message.userId;
        if (message.token != null && message.hasOwnProperty("token"))
            object.token = message.token;
        return object;
    };

    /**
     * Converts this RspUserLogin to JSON.
     * @function toJSON
     * @memberof RspUserLogin
     * @instance
     * @returns {Object.<string,*>} JSON object
     */
    RspUserLogin.prototype.toJSON = function toJSON() {
        return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
    };

    /**
     * Gets the default type url for RspUserLogin
     * @function getTypeUrl
     * @memberof RspUserLogin
     * @static
     * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
     * @returns {string} The default type url
     */
    RspUserLogin.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
        if (typeUrlPrefix === undefined) {
            typeUrlPrefix = "type.googleapis.com";
        }
        return typeUrlPrefix + "/RspUserLogin";
    };

    return RspUserLogin;
})();

$root.NtfUserOnline = (function() {

    /**
     * Properties of a NtfUserOnline.
     * @exports INtfUserOnline
     * @interface INtfUserOnline
     * @property {Long|null} [userId] NtfUserOnline userId
     */

    /**
     * Constructs a new NtfUserOnline.
     * @exports NtfUserOnline
     * @classdesc Represents a NtfUserOnline.
     * @implements INtfUserOnline
     * @constructor
     * @param {INtfUserOnline=} [properties] Properties to set
     */
    function NtfUserOnline(properties) {
        if (properties)
            for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                if (properties[keys[i]] != null)
                    this[keys[i]] = properties[keys[i]];
    }

    /**
     * NtfUserOnline userId.
     * @member {Long} userId
     * @memberof NtfUserOnline
     * @instance
     */
    NtfUserOnline.prototype.userId = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

    /**
     * Creates a new NtfUserOnline instance using the specified properties.
     * @function create
     * @memberof NtfUserOnline
     * @static
     * @param {INtfUserOnline=} [properties] Properties to set
     * @returns {NtfUserOnline} NtfUserOnline instance
     */
    NtfUserOnline.create = function create(properties) {
        return new NtfUserOnline(properties);
    };

    /**
     * Encodes the specified NtfUserOnline message. Does not implicitly {@link NtfUserOnline.verify|verify} messages.
     * @function encode
     * @memberof NtfUserOnline
     * @static
     * @param {INtfUserOnline} message NtfUserOnline message or plain object to encode
     * @param {$protobuf.Writer} [writer] Writer to encode to
     * @returns {$protobuf.Writer} Writer
     */
    NtfUserOnline.encode = function encode(message, writer) {
        if (!writer)
            writer = $Writer.create();
        if (message.userId != null && Object.hasOwnProperty.call(message, "userId"))
            writer.uint32(/* id 2, wireType 0 =*/16).int64(message.userId);
        return writer;
    };

    /**
     * Encodes the specified NtfUserOnline message, length delimited. Does not implicitly {@link NtfUserOnline.verify|verify} messages.
     * @function encodeDelimited
     * @memberof NtfUserOnline
     * @static
     * @param {INtfUserOnline} message NtfUserOnline message or plain object to encode
     * @param {$protobuf.Writer} [writer] Writer to encode to
     * @returns {$protobuf.Writer} Writer
     */
    NtfUserOnline.encodeDelimited = function encodeDelimited(message, writer) {
        return this.encode(message, writer).ldelim();
    };

    /**
     * Decodes a NtfUserOnline message from the specified reader or buffer.
     * @function decode
     * @memberof NtfUserOnline
     * @static
     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
     * @param {number} [length] Message length if known beforehand
     * @returns {NtfUserOnline} NtfUserOnline
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    NtfUserOnline.decode = function decode(reader, length, error) {
        if (!(reader instanceof $Reader))
            reader = $Reader.create(reader);
        var end = length === undefined ? reader.len : reader.pos + length, message = new $root.NtfUserOnline();
        while (reader.pos < end) {
            var tag = reader.uint32();
            if (tag === error)
                break;
            switch (tag >>> 3) {
            case 2: {
                    message.userId = reader.int64();
                    break;
                }
            default:
                reader.skipType(tag & 7);
                break;
            }
        }
        return message;
    };

    /**
     * Decodes a NtfUserOnline message from the specified reader or buffer, length delimited.
     * @function decodeDelimited
     * @memberof NtfUserOnline
     * @static
     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
     * @returns {NtfUserOnline} NtfUserOnline
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    NtfUserOnline.decodeDelimited = function decodeDelimited(reader) {
        if (!(reader instanceof $Reader))
            reader = new $Reader(reader);
        return this.decode(reader, reader.uint32());
    };

    /**
     * Verifies a NtfUserOnline message.
     * @function verify
     * @memberof NtfUserOnline
     * @static
     * @param {Object.<string,*>} message Plain object to verify
     * @returns {string|null} `null` if valid, otherwise the reason why it is not
     */
    NtfUserOnline.verify = function verify(message) {
        if (typeof message !== "object" || message === null)
            return "object expected";
        if (message.userId != null && message.hasOwnProperty("userId"))
            if (!$util.isInteger(message.userId) && !(message.userId && $util.isInteger(message.userId.low) && $util.isInteger(message.userId.high)))
                return "userId: integer|Long expected";
        return null;
    };

    /**
     * Creates a NtfUserOnline message from a plain object. Also converts values to their respective internal types.
     * @function fromObject
     * @memberof NtfUserOnline
     * @static
     * @param {Object.<string,*>} object Plain object
     * @returns {NtfUserOnline} NtfUserOnline
     */
    NtfUserOnline.fromObject = function fromObject(object) {
        if (object instanceof $root.NtfUserOnline)
            return object;
        var message = new $root.NtfUserOnline();
        if (object.userId != null)
            if ($util.Long)
                (message.userId = $util.Long.fromValue(object.userId)).unsigned = false;
            else if (typeof object.userId === "string")
                message.userId = parseInt(object.userId, 10);
            else if (typeof object.userId === "number")
                message.userId = object.userId;
            else if (typeof object.userId === "object")
                message.userId = new $util.LongBits(object.userId.low >>> 0, object.userId.high >>> 0).toNumber();
        return message;
    };

    /**
     * Creates a plain object from a NtfUserOnline message. Also converts values to other types if specified.
     * @function toObject
     * @memberof NtfUserOnline
     * @static
     * @param {NtfUserOnline} message NtfUserOnline
     * @param {$protobuf.IConversionOptions} [options] Conversion options
     * @returns {Object.<string,*>} Plain object
     */
    NtfUserOnline.toObject = function toObject(message, options) {
        if (!options)
            options = {};
        var object = {};
        if (options.defaults)
            if ($util.Long) {
                var long = new $util.Long(0, 0, false);
                object.userId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
            } else
                object.userId = options.longs === String ? "0" : 0;
        if (message.userId != null && message.hasOwnProperty("userId"))
            if (typeof message.userId === "number")
                object.userId = options.longs === String ? String(message.userId) : message.userId;
            else
                object.userId = options.longs === String ? $util.Long.prototype.toString.call(message.userId) : options.longs === Number ? new $util.LongBits(message.userId.low >>> 0, message.userId.high >>> 0).toNumber() : message.userId;
        return object;
    };

    /**
     * Converts this NtfUserOnline to JSON.
     * @function toJSON
     * @memberof NtfUserOnline
     * @instance
     * @returns {Object.<string,*>} JSON object
     */
    NtfUserOnline.prototype.toJSON = function toJSON() {
        return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
    };

    /**
     * Gets the default type url for NtfUserOnline
     * @function getTypeUrl
     * @memberof NtfUserOnline
     * @static
     * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
     * @returns {string} The default type url
     */
    NtfUserOnline.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
        if (typeUrlPrefix === undefined) {
            typeUrlPrefix = "type.googleapis.com";
        }
        return typeUrlPrefix + "/NtfUserOnline";
    };

    return NtfUserOnline;
})();

$root.NtfUserInService = (function() {

    /**
     * Properties of a NtfUserInService.
     * @exports INtfUserInService
     * @interface INtfUserInService
     * @property {Array.<string>|null} [serviceNames] NtfUserInService serviceNames
     */

    /**
     * Constructs a new NtfUserInService.
     * @exports NtfUserInService
     * @classdesc Represents a NtfUserInService.
     * @implements INtfUserInService
     * @constructor
     * @param {INtfUserInService=} [properties] Properties to set
     */
    function NtfUserInService(properties) {
        this.serviceNames = [];
        if (properties)
            for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                if (properties[keys[i]] != null)
                    this[keys[i]] = properties[keys[i]];
    }

    /**
     * NtfUserInService serviceNames.
     * @member {Array.<string>} serviceNames
     * @memberof NtfUserInService
     * @instance
     */
    NtfUserInService.prototype.serviceNames = $util.emptyArray;

    /**
     * Creates a new NtfUserInService instance using the specified properties.
     * @function create
     * @memberof NtfUserInService
     * @static
     * @param {INtfUserInService=} [properties] Properties to set
     * @returns {NtfUserInService} NtfUserInService instance
     */
    NtfUserInService.create = function create(properties) {
        return new NtfUserInService(properties);
    };

    /**
     * Encodes the specified NtfUserInService message. Does not implicitly {@link NtfUserInService.verify|verify} messages.
     * @function encode
     * @memberof NtfUserInService
     * @static
     * @param {INtfUserInService} message NtfUserInService message or plain object to encode
     * @param {$protobuf.Writer} [writer] Writer to encode to
     * @returns {$protobuf.Writer} Writer
     */
    NtfUserInService.encode = function encode(message, writer) {
        if (!writer)
            writer = $Writer.create();
        if (message.serviceNames != null && message.serviceNames.length)
            for (var i = 0; i < message.serviceNames.length; ++i)
                writer.uint32(/* id 3, wireType 2 =*/26).string(message.serviceNames[i]);
        return writer;
    };

    /**
     * Encodes the specified NtfUserInService message, length delimited. Does not implicitly {@link NtfUserInService.verify|verify} messages.
     * @function encodeDelimited
     * @memberof NtfUserInService
     * @static
     * @param {INtfUserInService} message NtfUserInService message or plain object to encode
     * @param {$protobuf.Writer} [writer] Writer to encode to
     * @returns {$protobuf.Writer} Writer
     */
    NtfUserInService.encodeDelimited = function encodeDelimited(message, writer) {
        return this.encode(message, writer).ldelim();
    };

    /**
     * Decodes a NtfUserInService message from the specified reader or buffer.
     * @function decode
     * @memberof NtfUserInService
     * @static
     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
     * @param {number} [length] Message length if known beforehand
     * @returns {NtfUserInService} NtfUserInService
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    NtfUserInService.decode = function decode(reader, length, error) {
        if (!(reader instanceof $Reader))
            reader = $Reader.create(reader);
        var end = length === undefined ? reader.len : reader.pos + length, message = new $root.NtfUserInService();
        while (reader.pos < end) {
            var tag = reader.uint32();
            if (tag === error)
                break;
            switch (tag >>> 3) {
            case 3: {
                    if (!(message.serviceNames && message.serviceNames.length))
                        message.serviceNames = [];
                    message.serviceNames.push(reader.string());
                    break;
                }
            default:
                reader.skipType(tag & 7);
                break;
            }
        }
        return message;
    };

    /**
     * Decodes a NtfUserInService message from the specified reader or buffer, length delimited.
     * @function decodeDelimited
     * @memberof NtfUserInService
     * @static
     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
     * @returns {NtfUserInService} NtfUserInService
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    NtfUserInService.decodeDelimited = function decodeDelimited(reader) {
        if (!(reader instanceof $Reader))
            reader = new $Reader(reader);
        return this.decode(reader, reader.uint32());
    };

    /**
     * Verifies a NtfUserInService message.
     * @function verify
     * @memberof NtfUserInService
     * @static
     * @param {Object.<string,*>} message Plain object to verify
     * @returns {string|null} `null` if valid, otherwise the reason why it is not
     */
    NtfUserInService.verify = function verify(message) {
        if (typeof message !== "object" || message === null)
            return "object expected";
        if (message.serviceNames != null && message.hasOwnProperty("serviceNames")) {
            if (!Array.isArray(message.serviceNames))
                return "serviceNames: array expected";
            for (var i = 0; i < message.serviceNames.length; ++i)
                if (!$util.isString(message.serviceNames[i]))
                    return "serviceNames: string[] expected";
        }
        return null;
    };

    /**
     * Creates a NtfUserInService message from a plain object. Also converts values to their respective internal types.
     * @function fromObject
     * @memberof NtfUserInService
     * @static
     * @param {Object.<string,*>} object Plain object
     * @returns {NtfUserInService} NtfUserInService
     */
    NtfUserInService.fromObject = function fromObject(object) {
        if (object instanceof $root.NtfUserInService)
            return object;
        var message = new $root.NtfUserInService();
        if (object.serviceNames) {
            if (!Array.isArray(object.serviceNames))
                throw TypeError(".NtfUserInService.serviceNames: array expected");
            message.serviceNames = [];
            for (var i = 0; i < object.serviceNames.length; ++i)
                message.serviceNames[i] = String(object.serviceNames[i]);
        }
        return message;
    };

    /**
     * Creates a plain object from a NtfUserInService message. Also converts values to other types if specified.
     * @function toObject
     * @memberof NtfUserInService
     * @static
     * @param {NtfUserInService} message NtfUserInService
     * @param {$protobuf.IConversionOptions} [options] Conversion options
     * @returns {Object.<string,*>} Plain object
     */
    NtfUserInService.toObject = function toObject(message, options) {
        if (!options)
            options = {};
        var object = {};
        if (options.arrays || options.defaults)
            object.serviceNames = [];
        if (message.serviceNames && message.serviceNames.length) {
            object.serviceNames = [];
            for (var j = 0; j < message.serviceNames.length; ++j)
                object.serviceNames[j] = message.serviceNames[j];
        }
        return object;
    };

    /**
     * Converts this NtfUserInService to JSON.
     * @function toJSON
     * @memberof NtfUserInService
     * @instance
     * @returns {Object.<string,*>} JSON object
     */
    NtfUserInService.prototype.toJSON = function toJSON() {
        return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
    };

    /**
     * Gets the default type url for NtfUserInService
     * @function getTypeUrl
     * @memberof NtfUserInService
     * @static
     * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
     * @returns {string} The default type url
     */
    NtfUserInService.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
        if (typeUrlPrefix === undefined) {
            typeUrlPrefix = "type.googleapis.com";
        }
        return typeUrlPrefix + "/NtfUserInService";
    };

    return NtfUserInService;
})();

$root.ReqUserLogout = (function() {

    /**
     * Properties of a ReqUserLogout.
     * @exports IReqUserLogout
     * @interface IReqUserLogout
     */

    /**
     * Constructs a new ReqUserLogout.
     * @exports ReqUserLogout
     * @classdesc Represents a ReqUserLogout.
     * @implements IReqUserLogout
     * @constructor
     * @param {IReqUserLogout=} [properties] Properties to set
     */
    function ReqUserLogout(properties) {
        if (properties)
            for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                if (properties[keys[i]] != null)
                    this[keys[i]] = properties[keys[i]];
    }

    /**
     * Creates a new ReqUserLogout instance using the specified properties.
     * @function create
     * @memberof ReqUserLogout
     * @static
     * @param {IReqUserLogout=} [properties] Properties to set
     * @returns {ReqUserLogout} ReqUserLogout instance
     */
    ReqUserLogout.create = function create(properties) {
        return new ReqUserLogout(properties);
    };

    /**
     * Encodes the specified ReqUserLogout message. Does not implicitly {@link ReqUserLogout.verify|verify} messages.
     * @function encode
     * @memberof ReqUserLogout
     * @static
     * @param {IReqUserLogout} message ReqUserLogout message or plain object to encode
     * @param {$protobuf.Writer} [writer] Writer to encode to
     * @returns {$protobuf.Writer} Writer
     */
    ReqUserLogout.encode = function encode(message, writer) {
        if (!writer)
            writer = $Writer.create();
        return writer;
    };

    /**
     * Encodes the specified ReqUserLogout message, length delimited. Does not implicitly {@link ReqUserLogout.verify|verify} messages.
     * @function encodeDelimited
     * @memberof ReqUserLogout
     * @static
     * @param {IReqUserLogout} message ReqUserLogout message or plain object to encode
     * @param {$protobuf.Writer} [writer] Writer to encode to
     * @returns {$protobuf.Writer} Writer
     */
    ReqUserLogout.encodeDelimited = function encodeDelimited(message, writer) {
        return this.encode(message, writer).ldelim();
    };

    /**
     * Decodes a ReqUserLogout message from the specified reader or buffer.
     * @function decode
     * @memberof ReqUserLogout
     * @static
     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
     * @param {number} [length] Message length if known beforehand
     * @returns {ReqUserLogout} ReqUserLogout
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    ReqUserLogout.decode = function decode(reader, length, error) {
        if (!(reader instanceof $Reader))
            reader = $Reader.create(reader);
        var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ReqUserLogout();
        while (reader.pos < end) {
            var tag = reader.uint32();
            if (tag === error)
                break;
            switch (tag >>> 3) {
            default:
                reader.skipType(tag & 7);
                break;
            }
        }
        return message;
    };

    /**
     * Decodes a ReqUserLogout message from the specified reader or buffer, length delimited.
     * @function decodeDelimited
     * @memberof ReqUserLogout
     * @static
     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
     * @returns {ReqUserLogout} ReqUserLogout
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    ReqUserLogout.decodeDelimited = function decodeDelimited(reader) {
        if (!(reader instanceof $Reader))
            reader = new $Reader(reader);
        return this.decode(reader, reader.uint32());
    };

    /**
     * Verifies a ReqUserLogout message.
     * @function verify
     * @memberof ReqUserLogout
     * @static
     * @param {Object.<string,*>} message Plain object to verify
     * @returns {string|null} `null` if valid, otherwise the reason why it is not
     */
    ReqUserLogout.verify = function verify(message) {
        if (typeof message !== "object" || message === null)
            return "object expected";
        return null;
    };

    /**
     * Creates a ReqUserLogout message from a plain object. Also converts values to their respective internal types.
     * @function fromObject
     * @memberof ReqUserLogout
     * @static
     * @param {Object.<string,*>} object Plain object
     * @returns {ReqUserLogout} ReqUserLogout
     */
    ReqUserLogout.fromObject = function fromObject(object) {
        if (object instanceof $root.ReqUserLogout)
            return object;
        return new $root.ReqUserLogout();
    };

    /**
     * Creates a plain object from a ReqUserLogout message. Also converts values to other types if specified.
     * @function toObject
     * @memberof ReqUserLogout
     * @static
     * @param {ReqUserLogout} message ReqUserLogout
     * @param {$protobuf.IConversionOptions} [options] Conversion options
     * @returns {Object.<string,*>} Plain object
     */
    ReqUserLogout.toObject = function toObject() {
        return {};
    };

    /**
     * Converts this ReqUserLogout to JSON.
     * @function toJSON
     * @memberof ReqUserLogout
     * @instance
     * @returns {Object.<string,*>} JSON object
     */
    ReqUserLogout.prototype.toJSON = function toJSON() {
        return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
    };

    /**
     * Gets the default type url for ReqUserLogout
     * @function getTypeUrl
     * @memberof ReqUserLogout
     * @static
     * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
     * @returns {string} The default type url
     */
    ReqUserLogout.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
        if (typeUrlPrefix === undefined) {
            typeUrlPrefix = "type.googleapis.com";
        }
        return typeUrlPrefix + "/ReqUserLogout";
    };

    return ReqUserLogout;
})();

$root.RspUserLogout = (function() {

    /**
     * Properties of a RspUserLogout.
     * @exports IRspUserLogout
     * @interface IRspUserLogout
     * @property {ErrCode|null} [code] RspUserLogout code
     */

    /**
     * Constructs a new RspUserLogout.
     * @exports RspUserLogout
     * @classdesc Represents a RspUserLogout.
     * @implements IRspUserLogout
     * @constructor
     * @param {IRspUserLogout=} [properties] Properties to set
     */
    function RspUserLogout(properties) {
        if (properties)
            for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                if (properties[keys[i]] != null)
                    this[keys[i]] = properties[keys[i]];
    }

    /**
     * RspUserLogout code.
     * @member {ErrCode} code
     * @memberof RspUserLogout
     * @instance
     */
    RspUserLogout.prototype.code = 0;

    /**
     * Creates a new RspUserLogout instance using the specified properties.
     * @function create
     * @memberof RspUserLogout
     * @static
     * @param {IRspUserLogout=} [properties] Properties to set
     * @returns {RspUserLogout} RspUserLogout instance
     */
    RspUserLogout.create = function create(properties) {
        return new RspUserLogout(properties);
    };

    /**
     * Encodes the specified RspUserLogout message. Does not implicitly {@link RspUserLogout.verify|verify} messages.
     * @function encode
     * @memberof RspUserLogout
     * @static
     * @param {IRspUserLogout} message RspUserLogout message or plain object to encode
     * @param {$protobuf.Writer} [writer] Writer to encode to
     * @returns {$protobuf.Writer} Writer
     */
    RspUserLogout.encode = function encode(message, writer) {
        if (!writer)
            writer = $Writer.create();
        if (message.code != null && Object.hasOwnProperty.call(message, "code"))
            writer.uint32(/* id 1, wireType 0 =*/8).int32(message.code);
        return writer;
    };

    /**
     * Encodes the specified RspUserLogout message, length delimited. Does not implicitly {@link RspUserLogout.verify|verify} messages.
     * @function encodeDelimited
     * @memberof RspUserLogout
     * @static
     * @param {IRspUserLogout} message RspUserLogout message or plain object to encode
     * @param {$protobuf.Writer} [writer] Writer to encode to
     * @returns {$protobuf.Writer} Writer
     */
    RspUserLogout.encodeDelimited = function encodeDelimited(message, writer) {
        return this.encode(message, writer).ldelim();
    };

    /**
     * Decodes a RspUserLogout message from the specified reader or buffer.
     * @function decode
     * @memberof RspUserLogout
     * @static
     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
     * @param {number} [length] Message length if known beforehand
     * @returns {RspUserLogout} RspUserLogout
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    RspUserLogout.decode = function decode(reader, length, error) {
        if (!(reader instanceof $Reader))
            reader = $Reader.create(reader);
        var end = length === undefined ? reader.len : reader.pos + length, message = new $root.RspUserLogout();
        while (reader.pos < end) {
            var tag = reader.uint32();
            if (tag === error)
                break;
            switch (tag >>> 3) {
            case 1: {
                    message.code = reader.int32();
                    break;
                }
            default:
                reader.skipType(tag & 7);
                break;
            }
        }
        return message;
    };

    /**
     * Decodes a RspUserLogout message from the specified reader or buffer, length delimited.
     * @function decodeDelimited
     * @memberof RspUserLogout
     * @static
     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
     * @returns {RspUserLogout} RspUserLogout
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    RspUserLogout.decodeDelimited = function decodeDelimited(reader) {
        if (!(reader instanceof $Reader))
            reader = new $Reader(reader);
        return this.decode(reader, reader.uint32());
    };

    /**
     * Verifies a RspUserLogout message.
     * @function verify
     * @memberof RspUserLogout
     * @static
     * @param {Object.<string,*>} message Plain object to verify
     * @returns {string|null} `null` if valid, otherwise the reason why it is not
     */
    RspUserLogout.verify = function verify(message) {
        if (typeof message !== "object" || message === null)
            return "object expected";
        if (message.code != null && message.hasOwnProperty("code"))
            switch (message.code) {
            default:
                return "code: enum value expected";
            case 0:
            case 1:
            case 2:
            case 100:
            case 102:
            case 103:
            case 104:
            case 110:
            case 115:
            case 120:
            case 125:
            case 126:
            case 127:
            case 500:
            case 505:
                break;
            }
        return null;
    };

    /**
     * Creates a RspUserLogout message from a plain object. Also converts values to their respective internal types.
     * @function fromObject
     * @memberof RspUserLogout
     * @static
     * @param {Object.<string,*>} object Plain object
     * @returns {RspUserLogout} RspUserLogout
     */
    RspUserLogout.fromObject = function fromObject(object) {
        if (object instanceof $root.RspUserLogout)
            return object;
        var message = new $root.RspUserLogout();
        switch (object.code) {
        default:
            if (typeof object.code === "number") {
                message.code = object.code;
                break;
            }
            break;
        case "OK":
        case 0:
            message.code = 0;
            break;
        case "SystemErr":
        case 1:
            message.code = 1;
            break;
        case "ParamErr":
        case 2:
            message.code = 2;
            break;
        case "LoginDiffLoc":
        case 100:
            message.code = 100;
            break;
        case "LoginUserOrPwdErr":
        case 102:
            message.code = 102;
            break;
        case "AccountFrozen":
        case 103:
            message.code = 103;
            break;
        case "AccountBanned":
        case 104:
            message.code = 104;
            break;
        case "RegisterUserExist":
        case 110:
            message.code = 110;
            break;
        case "VersionTooLow":
        case 115:
            message.code = 115;
            break;
        case "Maintain":
        case 120:
            message.code = 120;
            break;
        case "GoldNotEnough":
        case 125:
            message.code = 125;
            break;
        case "NotBetCount":
        case 126:
            message.code = 126;
            break;
        case "NotLeaveRoom":
        case 127:
            message.code = 127;
            break;
        case "TotalBetExceedsLimit":
        case 500:
            message.code = 500;
            break;
        case "AreaBetExceedsLimit":
        case 505:
            message.code = 505;
            break;
        }
        return message;
    };

    /**
     * Creates a plain object from a RspUserLogout message. Also converts values to other types if specified.
     * @function toObject
     * @memberof RspUserLogout
     * @static
     * @param {RspUserLogout} message RspUserLogout
     * @param {$protobuf.IConversionOptions} [options] Conversion options
     * @returns {Object.<string,*>} Plain object
     */
    RspUserLogout.toObject = function toObject(message, options) {
        if (!options)
            options = {};
        var object = {};
        if (options.defaults)
            object.code = options.enums === String ? "OK" : 0;
        if (message.code != null && message.hasOwnProperty("code"))
            object.code = options.enums === String ? $root.ErrCode[message.code] === undefined ? message.code : $root.ErrCode[message.code] : message.code;
        return object;
    };

    /**
     * Converts this RspUserLogout to JSON.
     * @function toJSON
     * @memberof RspUserLogout
     * @instance
     * @returns {Object.<string,*>} JSON object
     */
    RspUserLogout.prototype.toJSON = function toJSON() {
        return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
    };

    /**
     * Gets the default type url for RspUserLogout
     * @function getTypeUrl
     * @memberof RspUserLogout
     * @static
     * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
     * @returns {string} The default type url
     */
    RspUserLogout.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
        if (typeUrlPrefix === undefined) {
            typeUrlPrefix = "type.googleapis.com";
        }
        return typeUrlPrefix + "/RspUserLogout";
    };

    return RspUserLogout;
})();

$root.NtfUserOffline = (function() {

    /**
     * Properties of a NtfUserOffline.
     * @exports INtfUserOffline
     * @interface INtfUserOffline
     * @property {Long|null} [userId] NtfUserOffline userId
     */

    /**
     * Constructs a new NtfUserOffline.
     * @exports NtfUserOffline
     * @classdesc Represents a NtfUserOffline.
     * @implements INtfUserOffline
     * @constructor
     * @param {INtfUserOffline=} [properties] Properties to set
     */
    function NtfUserOffline(properties) {
        if (properties)
            for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                if (properties[keys[i]] != null)
                    this[keys[i]] = properties[keys[i]];
    }

    /**
     * NtfUserOffline userId.
     * @member {Long} userId
     * @memberof NtfUserOffline
     * @instance
     */
    NtfUserOffline.prototype.userId = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

    /**
     * Creates a new NtfUserOffline instance using the specified properties.
     * @function create
     * @memberof NtfUserOffline
     * @static
     * @param {INtfUserOffline=} [properties] Properties to set
     * @returns {NtfUserOffline} NtfUserOffline instance
     */
    NtfUserOffline.create = function create(properties) {
        return new NtfUserOffline(properties);
    };

    /**
     * Encodes the specified NtfUserOffline message. Does not implicitly {@link NtfUserOffline.verify|verify} messages.
     * @function encode
     * @memberof NtfUserOffline
     * @static
     * @param {INtfUserOffline} message NtfUserOffline message or plain object to encode
     * @param {$protobuf.Writer} [writer] Writer to encode to
     * @returns {$protobuf.Writer} Writer
     */
    NtfUserOffline.encode = function encode(message, writer) {
        if (!writer)
            writer = $Writer.create();
        if (message.userId != null && Object.hasOwnProperty.call(message, "userId"))
            writer.uint32(/* id 2, wireType 0 =*/16).int64(message.userId);
        return writer;
    };

    /**
     * Encodes the specified NtfUserOffline message, length delimited. Does not implicitly {@link NtfUserOffline.verify|verify} messages.
     * @function encodeDelimited
     * @memberof NtfUserOffline
     * @static
     * @param {INtfUserOffline} message NtfUserOffline message or plain object to encode
     * @param {$protobuf.Writer} [writer] Writer to encode to
     * @returns {$protobuf.Writer} Writer
     */
    NtfUserOffline.encodeDelimited = function encodeDelimited(message, writer) {
        return this.encode(message, writer).ldelim();
    };

    /**
     * Decodes a NtfUserOffline message from the specified reader or buffer.
     * @function decode
     * @memberof NtfUserOffline
     * @static
     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
     * @param {number} [length] Message length if known beforehand
     * @returns {NtfUserOffline} NtfUserOffline
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    NtfUserOffline.decode = function decode(reader, length, error) {
        if (!(reader instanceof $Reader))
            reader = $Reader.create(reader);
        var end = length === undefined ? reader.len : reader.pos + length, message = new $root.NtfUserOffline();
        while (reader.pos < end) {
            var tag = reader.uint32();
            if (tag === error)
                break;
            switch (tag >>> 3) {
            case 2: {
                    message.userId = reader.int64();
                    break;
                }
            default:
                reader.skipType(tag & 7);
                break;
            }
        }
        return message;
    };

    /**
     * Decodes a NtfUserOffline message from the specified reader or buffer, length delimited.
     * @function decodeDelimited
     * @memberof NtfUserOffline
     * @static
     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
     * @returns {NtfUserOffline} NtfUserOffline
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    NtfUserOffline.decodeDelimited = function decodeDelimited(reader) {
        if (!(reader instanceof $Reader))
            reader = new $Reader(reader);
        return this.decode(reader, reader.uint32());
    };

    /**
     * Verifies a NtfUserOffline message.
     * @function verify
     * @memberof NtfUserOffline
     * @static
     * @param {Object.<string,*>} message Plain object to verify
     * @returns {string|null} `null` if valid, otherwise the reason why it is not
     */
    NtfUserOffline.verify = function verify(message) {
        if (typeof message !== "object" || message === null)
            return "object expected";
        if (message.userId != null && message.hasOwnProperty("userId"))
            if (!$util.isInteger(message.userId) && !(message.userId && $util.isInteger(message.userId.low) && $util.isInteger(message.userId.high)))
                return "userId: integer|Long expected";
        return null;
    };

    /**
     * Creates a NtfUserOffline message from a plain object. Also converts values to their respective internal types.
     * @function fromObject
     * @memberof NtfUserOffline
     * @static
     * @param {Object.<string,*>} object Plain object
     * @returns {NtfUserOffline} NtfUserOffline
     */
    NtfUserOffline.fromObject = function fromObject(object) {
        if (object instanceof $root.NtfUserOffline)
            return object;
        var message = new $root.NtfUserOffline();
        if (object.userId != null)
            if ($util.Long)
                (message.userId = $util.Long.fromValue(object.userId)).unsigned = false;
            else if (typeof object.userId === "string")
                message.userId = parseInt(object.userId, 10);
            else if (typeof object.userId === "number")
                message.userId = object.userId;
            else if (typeof object.userId === "object")
                message.userId = new $util.LongBits(object.userId.low >>> 0, object.userId.high >>> 0).toNumber();
        return message;
    };

    /**
     * Creates a plain object from a NtfUserOffline message. Also converts values to other types if specified.
     * @function toObject
     * @memberof NtfUserOffline
     * @static
     * @param {NtfUserOffline} message NtfUserOffline
     * @param {$protobuf.IConversionOptions} [options] Conversion options
     * @returns {Object.<string,*>} Plain object
     */
    NtfUserOffline.toObject = function toObject(message, options) {
        if (!options)
            options = {};
        var object = {};
        if (options.defaults)
            if ($util.Long) {
                var long = new $util.Long(0, 0, false);
                object.userId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
            } else
                object.userId = options.longs === String ? "0" : 0;
        if (message.userId != null && message.hasOwnProperty("userId"))
            if (typeof message.userId === "number")
                object.userId = options.longs === String ? String(message.userId) : message.userId;
            else
                object.userId = options.longs === String ? $util.Long.prototype.toString.call(message.userId) : options.longs === Number ? new $util.LongBits(message.userId.low >>> 0, message.userId.high >>> 0).toNumber() : message.userId;
        return object;
    };

    /**
     * Converts this NtfUserOffline to JSON.
     * @function toJSON
     * @memberof NtfUserOffline
     * @instance
     * @returns {Object.<string,*>} JSON object
     */
    NtfUserOffline.prototype.toJSON = function toJSON() {
        return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
    };

    /**
     * Gets the default type url for NtfUserOffline
     * @function getTypeUrl
     * @memberof NtfUserOffline
     * @static
     * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
     * @returns {string} The default type url
     */
    NtfUserOffline.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
        if (typeUrlPrefix === undefined) {
            typeUrlPrefix = "type.googleapis.com";
        }
        return typeUrlPrefix + "/NtfUserOffline";
    };

    return NtfUserOffline;
})();

/**
 * ErrCode enum.
 * @exports ErrCode
 * @enum {number}
 * @property {number} OK=0 OK value
 * @property {number} SystemErr=1 SystemErr value
 * @property {number} ParamErr=2 ParamErr value
 * @property {number} LoginDiffLoc=100 LoginDiffLoc value
 * @property {number} LoginUserOrPwdErr=102 LoginUserOrPwdErr value
 * @property {number} AccountFrozen=103 AccountFrozen value
 * @property {number} AccountBanned=104 AccountBanned value
 * @property {number} RegisterUserExist=110 RegisterUserExist value
 * @property {number} VersionTooLow=115 VersionTooLow value
 * @property {number} Maintain=120 Maintain value
 * @property {number} GoldNotEnough=125 GoldNotEnough value
 * @property {number} NotBetCount=126 NotBetCount value
 * @property {number} NotLeaveRoom=127 NotLeaveRoom value
 * @property {number} TotalBetExceedsLimit=500 TotalBetExceedsLimit value
 * @property {number} AreaBetExceedsLimit=505 AreaBetExceedsLimit value
 */
$root.ErrCode = (function() {
    var valuesById = {}, values = Object.create(valuesById);
    values[valuesById[0] = "OK"] = 0;
    values[valuesById[1] = "SystemErr"] = 1;
    values[valuesById[2] = "ParamErr"] = 2;
    values[valuesById[100] = "LoginDiffLoc"] = 100;
    values[valuesById[102] = "LoginUserOrPwdErr"] = 102;
    values[valuesById[103] = "AccountFrozen"] = 103;
    values[valuesById[104] = "AccountBanned"] = 104;
    values[valuesById[110] = "RegisterUserExist"] = 110;
    values[valuesById[115] = "VersionTooLow"] = 115;
    values[valuesById[120] = "Maintain"] = 120;
    values[valuesById[125] = "GoldNotEnough"] = 125;
    values[valuesById[126] = "NotBetCount"] = 126;
    values[valuesById[127] = "NotLeaveRoom"] = 127;
    values[valuesById[500] = "TotalBetExceedsLimit"] = 500;
    values[valuesById[505] = "AreaBetExceedsLimit"] = 505;
    return values;
})();

module.exports = $root;
