2025-07-05 16:16:50 +08:00

1610 lines
52 KiB
JavaScript

/*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.NtfKickOutUser = (function() {
/**
* Properties of a NtfKickOutUser.
* @exports INtfKickOutUser
* @interface INtfKickOutUser
* @property {ErrCode|null} [code] NtfKickOutUser code
*/
/**
* Constructs a new NtfKickOutUser.
* @exports NtfKickOutUser
* @classdesc Represents a NtfKickOutUser.
* @implements INtfKickOutUser
* @constructor
* @param {INtfKickOutUser=} [properties] Properties to set
*/
function NtfKickOutUser(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]];
}
/**
* NtfKickOutUser code.
* @member {ErrCode} code
* @memberof NtfKickOutUser
* @instance
*/
NtfKickOutUser.prototype.code = 0;
/**
* Creates a new NtfKickOutUser instance using the specified properties.
* @function create
* @memberof NtfKickOutUser
* @static
* @param {INtfKickOutUser=} [properties] Properties to set
* @returns {NtfKickOutUser} NtfKickOutUser instance
*/
NtfKickOutUser.create = function create(properties) {
return new NtfKickOutUser(properties);
};
/**
* Encodes the specified NtfKickOutUser message. Does not implicitly {@link NtfKickOutUser.verify|verify} messages.
* @function encode
* @memberof NtfKickOutUser
* @static
* @param {INtfKickOutUser} message NtfKickOutUser message or plain object to encode
* @param {$protobuf.Writer} [writer] Writer to encode to
* @returns {$protobuf.Writer} Writer
*/
NtfKickOutUser.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 NtfKickOutUser message, length delimited. Does not implicitly {@link NtfKickOutUser.verify|verify} messages.
* @function encodeDelimited
* @memberof NtfKickOutUser
* @static
* @param {INtfKickOutUser} message NtfKickOutUser message or plain object to encode
* @param {$protobuf.Writer} [writer] Writer to encode to
* @returns {$protobuf.Writer} Writer
*/
NtfKickOutUser.encodeDelimited = function encodeDelimited(message, writer) {
return this.encode(message, writer).ldelim();
};
/**
* Decodes a NtfKickOutUser message from the specified reader or buffer.
* @function decode
* @memberof NtfKickOutUser
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @param {number} [length] Message length if known beforehand
* @returns {NtfKickOutUser} NtfKickOutUser
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
NtfKickOutUser.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.NtfKickOutUser();
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 NtfKickOutUser message from the specified reader or buffer, length delimited.
* @function decodeDelimited
* @memberof NtfKickOutUser
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @returns {NtfKickOutUser} NtfKickOutUser
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
NtfKickOutUser.decodeDelimited = function decodeDelimited(reader) {
if (!(reader instanceof $Reader))
reader = new $Reader(reader);
return this.decode(reader, reader.uint32());
};
/**
* Verifies a NtfKickOutUser message.
* @function verify
* @memberof NtfKickOutUser
* @static
* @param {Object.<string,*>} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
NtfKickOutUser.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 NtfKickOutUser message from a plain object. Also converts values to their respective internal types.
* @function fromObject
* @memberof NtfKickOutUser
* @static
* @param {Object.<string,*>} object Plain object
* @returns {NtfKickOutUser} NtfKickOutUser
*/
NtfKickOutUser.fromObject = function fromObject(object) {
if (object instanceof $root.NtfKickOutUser)
return object;
var message = new $root.NtfKickOutUser();
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 NtfKickOutUser message. Also converts values to other types if specified.
* @function toObject
* @memberof NtfKickOutUser
* @static
* @param {NtfKickOutUser} message NtfKickOutUser
* @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.<string,*>} Plain object
*/
NtfKickOutUser.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 NtfKickOutUser to JSON.
* @function toJSON
* @memberof NtfKickOutUser
* @instance
* @returns {Object.<string,*>} JSON object
*/
NtfKickOutUser.prototype.toJSON = function toJSON() {
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
};
/**
* Gets the default type url for NtfKickOutUser
* @function getTypeUrl
* @memberof NtfKickOutUser
* @static
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns {string} The default type url
*/
NtfKickOutUser.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
if (typeUrlPrefix === undefined) {
typeUrlPrefix = "type.googleapis.com";
}
return typeUrlPrefix + "/NtfKickOutUser";
};
return NtfKickOutUser;
})();
$root.ReqEnterRoom = (function() {
/**
* Properties of a ReqEnterRoom.
* @exports IReqEnterRoom
* @interface IReqEnterRoom
*/
/**
* Constructs a new ReqEnterRoom.
* @exports ReqEnterRoom
* @classdesc Represents a ReqEnterRoom.
* @implements IReqEnterRoom
* @constructor
* @param {IReqEnterRoom=} [properties] Properties to set
*/
function ReqEnterRoom(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 ReqEnterRoom instance using the specified properties.
* @function create
* @memberof ReqEnterRoom
* @static
* @param {IReqEnterRoom=} [properties] Properties to set
* @returns {ReqEnterRoom} ReqEnterRoom instance
*/
ReqEnterRoom.create = function create(properties) {
return new ReqEnterRoom(properties);
};
/**
* Encodes the specified ReqEnterRoom message. Does not implicitly {@link ReqEnterRoom.verify|verify} messages.
* @function encode
* @memberof ReqEnterRoom
* @static
* @param {IReqEnterRoom} message ReqEnterRoom message or plain object to encode
* @param {$protobuf.Writer} [writer] Writer to encode to
* @returns {$protobuf.Writer} Writer
*/
ReqEnterRoom.encode = function encode(message, writer) {
if (!writer)
writer = $Writer.create();
return writer;
};
/**
* Encodes the specified ReqEnterRoom message, length delimited. Does not implicitly {@link ReqEnterRoom.verify|verify} messages.
* @function encodeDelimited
* @memberof ReqEnterRoom
* @static
* @param {IReqEnterRoom} message ReqEnterRoom message or plain object to encode
* @param {$protobuf.Writer} [writer] Writer to encode to
* @returns {$protobuf.Writer} Writer
*/
ReqEnterRoom.encodeDelimited = function encodeDelimited(message, writer) {
return this.encode(message, writer).ldelim();
};
/**
* Decodes a ReqEnterRoom message from the specified reader or buffer.
* @function decode
* @memberof ReqEnterRoom
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @param {number} [length] Message length if known beforehand
* @returns {ReqEnterRoom} ReqEnterRoom
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
ReqEnterRoom.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.ReqEnterRoom();
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 ReqEnterRoom message from the specified reader or buffer, length delimited.
* @function decodeDelimited
* @memberof ReqEnterRoom
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @returns {ReqEnterRoom} ReqEnterRoom
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
ReqEnterRoom.decodeDelimited = function decodeDelimited(reader) {
if (!(reader instanceof $Reader))
reader = new $Reader(reader);
return this.decode(reader, reader.uint32());
};
/**
* Verifies a ReqEnterRoom message.
* @function verify
* @memberof ReqEnterRoom
* @static
* @param {Object.<string,*>} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
ReqEnterRoom.verify = function verify(message) {
if (typeof message !== "object" || message === null)
return "object expected";
return null;
};
/**
* Creates a ReqEnterRoom message from a plain object. Also converts values to their respective internal types.
* @function fromObject
* @memberof ReqEnterRoom
* @static
* @param {Object.<string,*>} object Plain object
* @returns {ReqEnterRoom} ReqEnterRoom
*/
ReqEnterRoom.fromObject = function fromObject(object) {
if (object instanceof $root.ReqEnterRoom)
return object;
return new $root.ReqEnterRoom();
};
/**
* Creates a plain object from a ReqEnterRoom message. Also converts values to other types if specified.
* @function toObject
* @memberof ReqEnterRoom
* @static
* @param {ReqEnterRoom} message ReqEnterRoom
* @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.<string,*>} Plain object
*/
ReqEnterRoom.toObject = function toObject() {
return {};
};
/**
* Converts this ReqEnterRoom to JSON.
* @function toJSON
* @memberof ReqEnterRoom
* @instance
* @returns {Object.<string,*>} JSON object
*/
ReqEnterRoom.prototype.toJSON = function toJSON() {
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
};
/**
* Gets the default type url for ReqEnterRoom
* @function getTypeUrl
* @memberof ReqEnterRoom
* @static
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns {string} The default type url
*/
ReqEnterRoom.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
if (typeUrlPrefix === undefined) {
typeUrlPrefix = "type.googleapis.com";
}
return typeUrlPrefix + "/ReqEnterRoom";
};
return ReqEnterRoom;
})();
$root.RspEnterRoom = (function() {
/**
* Properties of a RspEnterRoom.
* @exports IRspEnterRoom
* @interface IRspEnterRoom
* @property {ErrCode|null} [code] RspEnterRoom code
* @property {number|null} [gameId] RspEnterRoom gameId
* @property {number|null} [roomType] RspEnterRoom roomType
*/
/**
* Constructs a new RspEnterRoom.
* @exports RspEnterRoom
* @classdesc Represents a RspEnterRoom.
* @implements IRspEnterRoom
* @constructor
* @param {IRspEnterRoom=} [properties] Properties to set
*/
function RspEnterRoom(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]];
}
/**
* RspEnterRoom code.
* @member {ErrCode} code
* @memberof RspEnterRoom
* @instance
*/
RspEnterRoom.prototype.code = 0;
/**
* RspEnterRoom gameId.
* @member {number} gameId
* @memberof RspEnterRoom
* @instance
*/
RspEnterRoom.prototype.gameId = 0;
/**
* RspEnterRoom roomType.
* @member {number} roomType
* @memberof RspEnterRoom
* @instance
*/
RspEnterRoom.prototype.roomType = 0;
/**
* Creates a new RspEnterRoom instance using the specified properties.
* @function create
* @memberof RspEnterRoom
* @static
* @param {IRspEnterRoom=} [properties] Properties to set
* @returns {RspEnterRoom} RspEnterRoom instance
*/
RspEnterRoom.create = function create(properties) {
return new RspEnterRoom(properties);
};
/**
* Encodes the specified RspEnterRoom message. Does not implicitly {@link RspEnterRoom.verify|verify} messages.
* @function encode
* @memberof RspEnterRoom
* @static
* @param {IRspEnterRoom} message RspEnterRoom message or plain object to encode
* @param {$protobuf.Writer} [writer] Writer to encode to
* @returns {$protobuf.Writer} Writer
*/
RspEnterRoom.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.gameId != null && Object.hasOwnProperty.call(message, "gameId"))
writer.uint32(/* id 2, wireType 0 =*/16).int32(message.gameId);
if (message.roomType != null && Object.hasOwnProperty.call(message, "roomType"))
writer.uint32(/* id 3, wireType 0 =*/24).int32(message.roomType);
return writer;
};
/**
* Encodes the specified RspEnterRoom message, length delimited. Does not implicitly {@link RspEnterRoom.verify|verify} messages.
* @function encodeDelimited
* @memberof RspEnterRoom
* @static
* @param {IRspEnterRoom} message RspEnterRoom message or plain object to encode
* @param {$protobuf.Writer} [writer] Writer to encode to
* @returns {$protobuf.Writer} Writer
*/
RspEnterRoom.encodeDelimited = function encodeDelimited(message, writer) {
return this.encode(message, writer).ldelim();
};
/**
* Decodes a RspEnterRoom message from the specified reader or buffer.
* @function decode
* @memberof RspEnterRoom
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @param {number} [length] Message length if known beforehand
* @returns {RspEnterRoom} RspEnterRoom
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
RspEnterRoom.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.RspEnterRoom();
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.gameId = reader.int32();
break;
}
case 3: {
message.roomType = reader.int32();
break;
}
default:
reader.skipType(tag & 7);
break;
}
}
return message;
};
/**
* Decodes a RspEnterRoom message from the specified reader or buffer, length delimited.
* @function decodeDelimited
* @memberof RspEnterRoom
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @returns {RspEnterRoom} RspEnterRoom
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
RspEnterRoom.decodeDelimited = function decodeDelimited(reader) {
if (!(reader instanceof $Reader))
reader = new $Reader(reader);
return this.decode(reader, reader.uint32());
};
/**
* Verifies a RspEnterRoom message.
* @function verify
* @memberof RspEnterRoom
* @static
* @param {Object.<string,*>} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
RspEnterRoom.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.gameId != null && message.hasOwnProperty("gameId"))
if (!$util.isInteger(message.gameId))
return "gameId: integer expected";
if (message.roomType != null && message.hasOwnProperty("roomType"))
if (!$util.isInteger(message.roomType))
return "roomType: integer expected";
return null;
};
/**
* Creates a RspEnterRoom message from a plain object. Also converts values to their respective internal types.
* @function fromObject
* @memberof RspEnterRoom
* @static
* @param {Object.<string,*>} object Plain object
* @returns {RspEnterRoom} RspEnterRoom
*/
RspEnterRoom.fromObject = function fromObject(object) {
if (object instanceof $root.RspEnterRoom)
return object;
var message = new $root.RspEnterRoom();
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.gameId != null)
message.gameId = object.gameId | 0;
if (object.roomType != null)
message.roomType = object.roomType | 0;
return message;
};
/**
* Creates a plain object from a RspEnterRoom message. Also converts values to other types if specified.
* @function toObject
* @memberof RspEnterRoom
* @static
* @param {RspEnterRoom} message RspEnterRoom
* @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.<string,*>} Plain object
*/
RspEnterRoom.toObject = function toObject(message, options) {
if (!options)
options = {};
var object = {};
if (options.defaults) {
object.code = options.enums === String ? "OK" : 0;
object.gameId = 0;
object.roomType = 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;
if (message.gameId != null && message.hasOwnProperty("gameId"))
object.gameId = message.gameId;
if (message.roomType != null && message.hasOwnProperty("roomType"))
object.roomType = message.roomType;
return object;
};
/**
* Converts this RspEnterRoom to JSON.
* @function toJSON
* @memberof RspEnterRoom
* @instance
* @returns {Object.<string,*>} JSON object
*/
RspEnterRoom.prototype.toJSON = function toJSON() {
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
};
/**
* Gets the default type url for RspEnterRoom
* @function getTypeUrl
* @memberof RspEnterRoom
* @static
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns {string} The default type url
*/
RspEnterRoom.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
if (typeUrlPrefix === undefined) {
typeUrlPrefix = "type.googleapis.com";
}
return typeUrlPrefix + "/RspEnterRoom";
};
return RspEnterRoom;
})();
$root.ReqLeaveRoom = (function() {
/**
* Properties of a ReqLeaveRoom.
* @exports IReqLeaveRoom
* @interface IReqLeaveRoom
*/
/**
* Constructs a new ReqLeaveRoom.
* @exports ReqLeaveRoom
* @classdesc Represents a ReqLeaveRoom.
* @implements IReqLeaveRoom
* @constructor
* @param {IReqLeaveRoom=} [properties] Properties to set
*/
function ReqLeaveRoom(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 ReqLeaveRoom instance using the specified properties.
* @function create
* @memberof ReqLeaveRoom
* @static
* @param {IReqLeaveRoom=} [properties] Properties to set
* @returns {ReqLeaveRoom} ReqLeaveRoom instance
*/
ReqLeaveRoom.create = function create(properties) {
return new ReqLeaveRoom(properties);
};
/**
* Encodes the specified ReqLeaveRoom message. Does not implicitly {@link ReqLeaveRoom.verify|verify} messages.
* @function encode
* @memberof ReqLeaveRoom
* @static
* @param {IReqLeaveRoom} message ReqLeaveRoom message or plain object to encode
* @param {$protobuf.Writer} [writer] Writer to encode to
* @returns {$protobuf.Writer} Writer
*/
ReqLeaveRoom.encode = function encode(message, writer) {
if (!writer)
writer = $Writer.create();
return writer;
};
/**
* Encodes the specified ReqLeaveRoom message, length delimited. Does not implicitly {@link ReqLeaveRoom.verify|verify} messages.
* @function encodeDelimited
* @memberof ReqLeaveRoom
* @static
* @param {IReqLeaveRoom} message ReqLeaveRoom message or plain object to encode
* @param {$protobuf.Writer} [writer] Writer to encode to
* @returns {$protobuf.Writer} Writer
*/
ReqLeaveRoom.encodeDelimited = function encodeDelimited(message, writer) {
return this.encode(message, writer).ldelim();
};
/**
* Decodes a ReqLeaveRoom message from the specified reader or buffer.
* @function decode
* @memberof ReqLeaveRoom
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @param {number} [length] Message length if known beforehand
* @returns {ReqLeaveRoom} ReqLeaveRoom
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
ReqLeaveRoom.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.ReqLeaveRoom();
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 ReqLeaveRoom message from the specified reader or buffer, length delimited.
* @function decodeDelimited
* @memberof ReqLeaveRoom
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @returns {ReqLeaveRoom} ReqLeaveRoom
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
ReqLeaveRoom.decodeDelimited = function decodeDelimited(reader) {
if (!(reader instanceof $Reader))
reader = new $Reader(reader);
return this.decode(reader, reader.uint32());
};
/**
* Verifies a ReqLeaveRoom message.
* @function verify
* @memberof ReqLeaveRoom
* @static
* @param {Object.<string,*>} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
ReqLeaveRoom.verify = function verify(message) {
if (typeof message !== "object" || message === null)
return "object expected";
return null;
};
/**
* Creates a ReqLeaveRoom message from a plain object. Also converts values to their respective internal types.
* @function fromObject
* @memberof ReqLeaveRoom
* @static
* @param {Object.<string,*>} object Plain object
* @returns {ReqLeaveRoom} ReqLeaveRoom
*/
ReqLeaveRoom.fromObject = function fromObject(object) {
if (object instanceof $root.ReqLeaveRoom)
return object;
return new $root.ReqLeaveRoom();
};
/**
* Creates a plain object from a ReqLeaveRoom message. Also converts values to other types if specified.
* @function toObject
* @memberof ReqLeaveRoom
* @static
* @param {ReqLeaveRoom} message ReqLeaveRoom
* @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.<string,*>} Plain object
*/
ReqLeaveRoom.toObject = function toObject() {
return {};
};
/**
* Converts this ReqLeaveRoom to JSON.
* @function toJSON
* @memberof ReqLeaveRoom
* @instance
* @returns {Object.<string,*>} JSON object
*/
ReqLeaveRoom.prototype.toJSON = function toJSON() {
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
};
/**
* Gets the default type url for ReqLeaveRoom
* @function getTypeUrl
* @memberof ReqLeaveRoom
* @static
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns {string} The default type url
*/
ReqLeaveRoom.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
if (typeUrlPrefix === undefined) {
typeUrlPrefix = "type.googleapis.com";
}
return typeUrlPrefix + "/ReqLeaveRoom";
};
return ReqLeaveRoom;
})();
$root.RspLeaveRoom = (function() {
/**
* Properties of a RspLeaveRoom.
* @exports IRspLeaveRoom
* @interface IRspLeaveRoom
* @property {ErrCode|null} [code] RspLeaveRoom code
*/
/**
* Constructs a new RspLeaveRoom.
* @exports RspLeaveRoom
* @classdesc Represents a RspLeaveRoom.
* @implements IRspLeaveRoom
* @constructor
* @param {IRspLeaveRoom=} [properties] Properties to set
*/
function RspLeaveRoom(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]];
}
/**
* RspLeaveRoom code.
* @member {ErrCode} code
* @memberof RspLeaveRoom
* @instance
*/
RspLeaveRoom.prototype.code = 0;
/**
* Creates a new RspLeaveRoom instance using the specified properties.
* @function create
* @memberof RspLeaveRoom
* @static
* @param {IRspLeaveRoom=} [properties] Properties to set
* @returns {RspLeaveRoom} RspLeaveRoom instance
*/
RspLeaveRoom.create = function create(properties) {
return new RspLeaveRoom(properties);
};
/**
* Encodes the specified RspLeaveRoom message. Does not implicitly {@link RspLeaveRoom.verify|verify} messages.
* @function encode
* @memberof RspLeaveRoom
* @static
* @param {IRspLeaveRoom} message RspLeaveRoom message or plain object to encode
* @param {$protobuf.Writer} [writer] Writer to encode to
* @returns {$protobuf.Writer} Writer
*/
RspLeaveRoom.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 RspLeaveRoom message, length delimited. Does not implicitly {@link RspLeaveRoom.verify|verify} messages.
* @function encodeDelimited
* @memberof RspLeaveRoom
* @static
* @param {IRspLeaveRoom} message RspLeaveRoom message or plain object to encode
* @param {$protobuf.Writer} [writer] Writer to encode to
* @returns {$protobuf.Writer} Writer
*/
RspLeaveRoom.encodeDelimited = function encodeDelimited(message, writer) {
return this.encode(message, writer).ldelim();
};
/**
* Decodes a RspLeaveRoom message from the specified reader or buffer.
* @function decode
* @memberof RspLeaveRoom
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @param {number} [length] Message length if known beforehand
* @returns {RspLeaveRoom} RspLeaveRoom
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
RspLeaveRoom.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.RspLeaveRoom();
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 RspLeaveRoom message from the specified reader or buffer, length delimited.
* @function decodeDelimited
* @memberof RspLeaveRoom
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @returns {RspLeaveRoom} RspLeaveRoom
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
RspLeaveRoom.decodeDelimited = function decodeDelimited(reader) {
if (!(reader instanceof $Reader))
reader = new $Reader(reader);
return this.decode(reader, reader.uint32());
};
/**
* Verifies a RspLeaveRoom message.
* @function verify
* @memberof RspLeaveRoom
* @static
* @param {Object.<string,*>} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
RspLeaveRoom.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 RspLeaveRoom message from a plain object. Also converts values to their respective internal types.
* @function fromObject
* @memberof RspLeaveRoom
* @static
* @param {Object.<string,*>} object Plain object
* @returns {RspLeaveRoom} RspLeaveRoom
*/
RspLeaveRoom.fromObject = function fromObject(object) {
if (object instanceof $root.RspLeaveRoom)
return object;
var message = new $root.RspLeaveRoom();
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 RspLeaveRoom message. Also converts values to other types if specified.
* @function toObject
* @memberof RspLeaveRoom
* @static
* @param {RspLeaveRoom} message RspLeaveRoom
* @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.<string,*>} Plain object
*/
RspLeaveRoom.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 RspLeaveRoom to JSON.
* @function toJSON
* @memberof RspLeaveRoom
* @instance
* @returns {Object.<string,*>} JSON object
*/
RspLeaveRoom.prototype.toJSON = function toJSON() {
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
};
/**
* Gets the default type url for RspLeaveRoom
* @function getTypeUrl
* @memberof RspLeaveRoom
* @static
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns {string} The default type url
*/
RspLeaveRoom.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
if (typeUrlPrefix === undefined) {
typeUrlPrefix = "type.googleapis.com";
}
return typeUrlPrefix + "/RspLeaveRoom";
};
return RspLeaveRoom;
})();
$root.NtfPayoutFail = (function() {
/**
* Properties of a NtfPayoutFail.
* @exports INtfPayoutFail
* @interface INtfPayoutFail
* @property {ErrCode|null} [code] NtfPayoutFail code
*/
/**
* Constructs a new NtfPayoutFail.
* @exports NtfPayoutFail
* @classdesc Represents a NtfPayoutFail.
* @implements INtfPayoutFail
* @constructor
* @param {INtfPayoutFail=} [properties] Properties to set
*/
function NtfPayoutFail(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]];
}
/**
* NtfPayoutFail code.
* @member {ErrCode} code
* @memberof NtfPayoutFail
* @instance
*/
NtfPayoutFail.prototype.code = 0;
/**
* Creates a new NtfPayoutFail instance using the specified properties.
* @function create
* @memberof NtfPayoutFail
* @static
* @param {INtfPayoutFail=} [properties] Properties to set
* @returns {NtfPayoutFail} NtfPayoutFail instance
*/
NtfPayoutFail.create = function create(properties) {
return new NtfPayoutFail(properties);
};
/**
* Encodes the specified NtfPayoutFail message. Does not implicitly {@link NtfPayoutFail.verify|verify} messages.
* @function encode
* @memberof NtfPayoutFail
* @static
* @param {INtfPayoutFail} message NtfPayoutFail message or plain object to encode
* @param {$protobuf.Writer} [writer] Writer to encode to
* @returns {$protobuf.Writer} Writer
*/
NtfPayoutFail.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 NtfPayoutFail message, length delimited. Does not implicitly {@link NtfPayoutFail.verify|verify} messages.
* @function encodeDelimited
* @memberof NtfPayoutFail
* @static
* @param {INtfPayoutFail} message NtfPayoutFail message or plain object to encode
* @param {$protobuf.Writer} [writer] Writer to encode to
* @returns {$protobuf.Writer} Writer
*/
NtfPayoutFail.encodeDelimited = function encodeDelimited(message, writer) {
return this.encode(message, writer).ldelim();
};
/**
* Decodes a NtfPayoutFail message from the specified reader or buffer.
* @function decode
* @memberof NtfPayoutFail
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @param {number} [length] Message length if known beforehand
* @returns {NtfPayoutFail} NtfPayoutFail
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
NtfPayoutFail.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.NtfPayoutFail();
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 NtfPayoutFail message from the specified reader or buffer, length delimited.
* @function decodeDelimited
* @memberof NtfPayoutFail
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @returns {NtfPayoutFail} NtfPayoutFail
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
NtfPayoutFail.decodeDelimited = function decodeDelimited(reader) {
if (!(reader instanceof $Reader))
reader = new $Reader(reader);
return this.decode(reader, reader.uint32());
};
/**
* Verifies a NtfPayoutFail message.
* @function verify
* @memberof NtfPayoutFail
* @static
* @param {Object.<string,*>} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
NtfPayoutFail.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 NtfPayoutFail message from a plain object. Also converts values to their respective internal types.
* @function fromObject
* @memberof NtfPayoutFail
* @static
* @param {Object.<string,*>} object Plain object
* @returns {NtfPayoutFail} NtfPayoutFail
*/
NtfPayoutFail.fromObject = function fromObject(object) {
if (object instanceof $root.NtfPayoutFail)
return object;
var message = new $root.NtfPayoutFail();
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 NtfPayoutFail message. Also converts values to other types if specified.
* @function toObject
* @memberof NtfPayoutFail
* @static
* @param {NtfPayoutFail} message NtfPayoutFail
* @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.<string,*>} Plain object
*/
NtfPayoutFail.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 NtfPayoutFail to JSON.
* @function toJSON
* @memberof NtfPayoutFail
* @instance
* @returns {Object.<string,*>} JSON object
*/
NtfPayoutFail.prototype.toJSON = function toJSON() {
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
};
/**
* Gets the default type url for NtfPayoutFail
* @function getTypeUrl
* @memberof NtfPayoutFail
* @static
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns {string} The default type url
*/
NtfPayoutFail.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
if (typeUrlPrefix === undefined) {
typeUrlPrefix = "type.googleapis.com";
}
return typeUrlPrefix + "/NtfPayoutFail";
};
return NtfPayoutFail;
})();
/**
* 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;