/*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.js"); // Common aliases var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; // Exported root namespace var $root = $protobuf.roots["default"] || ($protobuf.roots["default"] = {}); $root.cs = (function() { /** * Namespace cs. * @exports cs * @namespace */ var cs = {}; cs.CSDailyRecommendReq = (function() { /** * Properties of a CSDailyRecommendReq. * @memberof cs * @interface ICSDailyRecommendReq */ /** * Constructs a new CSDailyRecommendReq. * @memberof cs * @classdesc Represents a CSDailyRecommendReq. * @implements ICSDailyRecommendReq * @constructor * @param {cs.ICSDailyRecommendReq=} [properties] Properties to set */ function CSDailyRecommendReq(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 CSDailyRecommendReq instance using the specified properties. * @function create * @memberof cs.CSDailyRecommendReq * @static * @param {cs.ICSDailyRecommendReq=} [properties] Properties to set * @returns {cs.CSDailyRecommendReq} CSDailyRecommendReq instance */ CSDailyRecommendReq.create = function create(properties) { return new CSDailyRecommendReq(properties); }; /** * Encodes the specified CSDailyRecommendReq message. Does not implicitly {@link cs.CSDailyRecommendReq.verify|verify} messages. * @function encode * @memberof cs.CSDailyRecommendReq * @static * @param {cs.ICSDailyRecommendReq} message CSDailyRecommendReq message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSDailyRecommendReq.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); return writer; }; /** * Encodes the specified CSDailyRecommendReq message, length delimited. Does not implicitly {@link cs.CSDailyRecommendReq.verify|verify} messages. * @function encodeDelimited * @memberof cs.CSDailyRecommendReq * @static * @param {cs.ICSDailyRecommendReq} message CSDailyRecommendReq message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSDailyRecommendReq.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a CSDailyRecommendReq message from the specified reader or buffer. * @function decode * @memberof cs.CSDailyRecommendReq * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {cs.CSDailyRecommendReq} CSDailyRecommendReq * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSDailyRecommendReq.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.cs.CSDailyRecommendReq(); 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 CSDailyRecommendReq message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof cs.CSDailyRecommendReq * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {cs.CSDailyRecommendReq} CSDailyRecommendReq * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSDailyRecommendReq.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a CSDailyRecommendReq message. * @function verify * @memberof cs.CSDailyRecommendReq * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ CSDailyRecommendReq.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; return null; }; /** * Creates a CSDailyRecommendReq message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof cs.CSDailyRecommendReq * @static * @param {Object.} object Plain object * @returns {cs.CSDailyRecommendReq} CSDailyRecommendReq */ CSDailyRecommendReq.fromObject = function fromObject(object) { if (object instanceof $root.cs.CSDailyRecommendReq) return object; return new $root.cs.CSDailyRecommendReq(); }; /** * Creates a plain object from a CSDailyRecommendReq message. Also converts values to other types if specified. * @function toObject * @memberof cs.CSDailyRecommendReq * @static * @param {cs.CSDailyRecommendReq} message CSDailyRecommendReq * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ CSDailyRecommendReq.toObject = function toObject() { return {}; }; /** * Converts this CSDailyRecommendReq to JSON. * @function toJSON * @memberof cs.CSDailyRecommendReq * @instance * @returns {Object.} JSON object */ CSDailyRecommendReq.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for CSDailyRecommendReq * @function getTypeUrl * @memberof cs.CSDailyRecommendReq * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ CSDailyRecommendReq.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/cs.CSDailyRecommendReq"; }; return CSDailyRecommendReq; })(); cs.CSDailyRecommendRes = (function() { /** * Properties of a CSDailyRecommendRes. * @memberof cs * @interface ICSDailyRecommendRes * @property {cs.IGirls|null} [girl] CSDailyRecommendRes girl */ /** * Constructs a new CSDailyRecommendRes. * @memberof cs * @classdesc Represents a CSDailyRecommendRes. * @implements ICSDailyRecommendRes * @constructor * @param {cs.ICSDailyRecommendRes=} [properties] Properties to set */ function CSDailyRecommendRes(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]]; } /** * CSDailyRecommendRes girl. * @member {cs.IGirls|null|undefined} girl * @memberof cs.CSDailyRecommendRes * @instance */ CSDailyRecommendRes.prototype.girl = null; /** * Creates a new CSDailyRecommendRes instance using the specified properties. * @function create * @memberof cs.CSDailyRecommendRes * @static * @param {cs.ICSDailyRecommendRes=} [properties] Properties to set * @returns {cs.CSDailyRecommendRes} CSDailyRecommendRes instance */ CSDailyRecommendRes.create = function create(properties) { return new CSDailyRecommendRes(properties); }; /** * Encodes the specified CSDailyRecommendRes message. Does not implicitly {@link cs.CSDailyRecommendRes.verify|verify} messages. * @function encode * @memberof cs.CSDailyRecommendRes * @static * @param {cs.ICSDailyRecommendRes} message CSDailyRecommendRes message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSDailyRecommendRes.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.girl != null && Object.hasOwnProperty.call(message, "girl")) $root.cs.Girls.encode(message.girl, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** * Encodes the specified CSDailyRecommendRes message, length delimited. Does not implicitly {@link cs.CSDailyRecommendRes.verify|verify} messages. * @function encodeDelimited * @memberof cs.CSDailyRecommendRes * @static * @param {cs.ICSDailyRecommendRes} message CSDailyRecommendRes message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSDailyRecommendRes.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a CSDailyRecommendRes message from the specified reader or buffer. * @function decode * @memberof cs.CSDailyRecommendRes * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {cs.CSDailyRecommendRes} CSDailyRecommendRes * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSDailyRecommendRes.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.cs.CSDailyRecommendRes(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { message.girl = $root.cs.Girls.decode(reader, reader.uint32()); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a CSDailyRecommendRes message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof cs.CSDailyRecommendRes * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {cs.CSDailyRecommendRes} CSDailyRecommendRes * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSDailyRecommendRes.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a CSDailyRecommendRes message. * @function verify * @memberof cs.CSDailyRecommendRes * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ CSDailyRecommendRes.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.girl != null && message.hasOwnProperty("girl")) { var error = $root.cs.Girls.verify(message.girl); if (error) return "girl." + error; } return null; }; /** * Creates a CSDailyRecommendRes message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof cs.CSDailyRecommendRes * @static * @param {Object.} object Plain object * @returns {cs.CSDailyRecommendRes} CSDailyRecommendRes */ CSDailyRecommendRes.fromObject = function fromObject(object) { if (object instanceof $root.cs.CSDailyRecommendRes) return object; var message = new $root.cs.CSDailyRecommendRes(); if (object.girl != null) { if (typeof object.girl !== "object") throw TypeError(".cs.CSDailyRecommendRes.girl: object expected"); message.girl = $root.cs.Girls.fromObject(object.girl); } return message; }; /** * Creates a plain object from a CSDailyRecommendRes message. Also converts values to other types if specified. * @function toObject * @memberof cs.CSDailyRecommendRes * @static * @param {cs.CSDailyRecommendRes} message CSDailyRecommendRes * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ CSDailyRecommendRes.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) object.girl = null; if (message.girl != null && message.hasOwnProperty("girl")) object.girl = $root.cs.Girls.toObject(message.girl, options); return object; }; /** * Converts this CSDailyRecommendRes to JSON. * @function toJSON * @memberof cs.CSDailyRecommendRes * @instance * @returns {Object.} JSON object */ CSDailyRecommendRes.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for CSDailyRecommendRes * @function getTypeUrl * @memberof cs.CSDailyRecommendRes * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ CSDailyRecommendRes.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/cs.CSDailyRecommendRes"; }; return CSDailyRecommendRes; })(); cs.CSHallThemeReq = (function() { /** * Properties of a CSHallThemeReq. * @memberof cs * @interface ICSHallThemeReq */ /** * Constructs a new CSHallThemeReq. * @memberof cs * @classdesc Represents a CSHallThemeReq. * @implements ICSHallThemeReq * @constructor * @param {cs.ICSHallThemeReq=} [properties] Properties to set */ function CSHallThemeReq(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 CSHallThemeReq instance using the specified properties. * @function create * @memberof cs.CSHallThemeReq * @static * @param {cs.ICSHallThemeReq=} [properties] Properties to set * @returns {cs.CSHallThemeReq} CSHallThemeReq instance */ CSHallThemeReq.create = function create(properties) { return new CSHallThemeReq(properties); }; /** * Encodes the specified CSHallThemeReq message. Does not implicitly {@link cs.CSHallThemeReq.verify|verify} messages. * @function encode * @memberof cs.CSHallThemeReq * @static * @param {cs.ICSHallThemeReq} message CSHallThemeReq message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSHallThemeReq.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); return writer; }; /** * Encodes the specified CSHallThemeReq message, length delimited. Does not implicitly {@link cs.CSHallThemeReq.verify|verify} messages. * @function encodeDelimited * @memberof cs.CSHallThemeReq * @static * @param {cs.ICSHallThemeReq} message CSHallThemeReq message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSHallThemeReq.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a CSHallThemeReq message from the specified reader or buffer. * @function decode * @memberof cs.CSHallThemeReq * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {cs.CSHallThemeReq} CSHallThemeReq * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSHallThemeReq.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.cs.CSHallThemeReq(); 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 CSHallThemeReq message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof cs.CSHallThemeReq * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {cs.CSHallThemeReq} CSHallThemeReq * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSHallThemeReq.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a CSHallThemeReq message. * @function verify * @memberof cs.CSHallThemeReq * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ CSHallThemeReq.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; return null; }; /** * Creates a CSHallThemeReq message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof cs.CSHallThemeReq * @static * @param {Object.} object Plain object * @returns {cs.CSHallThemeReq} CSHallThemeReq */ CSHallThemeReq.fromObject = function fromObject(object) { if (object instanceof $root.cs.CSHallThemeReq) return object; return new $root.cs.CSHallThemeReq(); }; /** * Creates a plain object from a CSHallThemeReq message. Also converts values to other types if specified. * @function toObject * @memberof cs.CSHallThemeReq * @static * @param {cs.CSHallThemeReq} message CSHallThemeReq * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ CSHallThemeReq.toObject = function toObject() { return {}; }; /** * Converts this CSHallThemeReq to JSON. * @function toJSON * @memberof cs.CSHallThemeReq * @instance * @returns {Object.} JSON object */ CSHallThemeReq.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for CSHallThemeReq * @function getTypeUrl * @memberof cs.CSHallThemeReq * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ CSHallThemeReq.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/cs.CSHallThemeReq"; }; return CSHallThemeReq; })(); cs.CSHallThemeRes = (function() { /** * Properties of a CSHallThemeRes. * @memberof cs * @interface ICSHallThemeRes * @property {Array.|null} [themes] CSHallThemeRes themes */ /** * Constructs a new CSHallThemeRes. * @memberof cs * @classdesc Represents a CSHallThemeRes. * @implements ICSHallThemeRes * @constructor * @param {cs.ICSHallThemeRes=} [properties] Properties to set */ function CSHallThemeRes(properties) { this.themes = []; 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]]; } /** * CSHallThemeRes themes. * @member {Array.} themes * @memberof cs.CSHallThemeRes * @instance */ CSHallThemeRes.prototype.themes = $util.emptyArray; /** * Creates a new CSHallThemeRes instance using the specified properties. * @function create * @memberof cs.CSHallThemeRes * @static * @param {cs.ICSHallThemeRes=} [properties] Properties to set * @returns {cs.CSHallThemeRes} CSHallThemeRes instance */ CSHallThemeRes.create = function create(properties) { return new CSHallThemeRes(properties); }; /** * Encodes the specified CSHallThemeRes message. Does not implicitly {@link cs.CSHallThemeRes.verify|verify} messages. * @function encode * @memberof cs.CSHallThemeRes * @static * @param {cs.ICSHallThemeRes} message CSHallThemeRes message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSHallThemeRes.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.themes != null && message.themes.length) for (var i = 0; i < message.themes.length; ++i) $root.cs.Themes.encode(message.themes[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** * Encodes the specified CSHallThemeRes message, length delimited. Does not implicitly {@link cs.CSHallThemeRes.verify|verify} messages. * @function encodeDelimited * @memberof cs.CSHallThemeRes * @static * @param {cs.ICSHallThemeRes} message CSHallThemeRes message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSHallThemeRes.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a CSHallThemeRes message from the specified reader or buffer. * @function decode * @memberof cs.CSHallThemeRes * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {cs.CSHallThemeRes} CSHallThemeRes * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSHallThemeRes.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.cs.CSHallThemeRes(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { if (!(message.themes && message.themes.length)) message.themes = []; message.themes.push($root.cs.Themes.decode(reader, reader.uint32())); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a CSHallThemeRes message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof cs.CSHallThemeRes * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {cs.CSHallThemeRes} CSHallThemeRes * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSHallThemeRes.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a CSHallThemeRes message. * @function verify * @memberof cs.CSHallThemeRes * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ CSHallThemeRes.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.themes != null && message.hasOwnProperty("themes")) { if (!Array.isArray(message.themes)) return "themes: array expected"; for (var i = 0; i < message.themes.length; ++i) { var error = $root.cs.Themes.verify(message.themes[i]); if (error) return "themes." + error; } } return null; }; /** * Creates a CSHallThemeRes message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof cs.CSHallThemeRes * @static * @param {Object.} object Plain object * @returns {cs.CSHallThemeRes} CSHallThemeRes */ CSHallThemeRes.fromObject = function fromObject(object) { if (object instanceof $root.cs.CSHallThemeRes) return object; var message = new $root.cs.CSHallThemeRes(); if (object.themes) { if (!Array.isArray(object.themes)) throw TypeError(".cs.CSHallThemeRes.themes: array expected"); message.themes = []; for (var i = 0; i < object.themes.length; ++i) { if (typeof object.themes[i] !== "object") throw TypeError(".cs.CSHallThemeRes.themes: object expected"); message.themes[i] = $root.cs.Themes.fromObject(object.themes[i]); } } return message; }; /** * Creates a plain object from a CSHallThemeRes message. Also converts values to other types if specified. * @function toObject * @memberof cs.CSHallThemeRes * @static * @param {cs.CSHallThemeRes} message CSHallThemeRes * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ CSHallThemeRes.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) object.themes = []; if (message.themes && message.themes.length) { object.themes = []; for (var j = 0; j < message.themes.length; ++j) object.themes[j] = $root.cs.Themes.toObject(message.themes[j], options); } return object; }; /** * Converts this CSHallThemeRes to JSON. * @function toJSON * @memberof cs.CSHallThemeRes * @instance * @returns {Object.} JSON object */ CSHallThemeRes.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for CSHallThemeRes * @function getTypeUrl * @memberof cs.CSHallThemeRes * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ CSHallThemeRes.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/cs.CSHallThemeRes"; }; return CSHallThemeRes; })(); cs.ResourceUnlock = (function() { /** * Properties of a ResourceUnlock. * @memberof cs * @interface IResourceUnlock * @property {number|null} [girlId] ResourceUnlock girlId * @property {number|null} [resId] ResourceUnlock resId */ /** * Constructs a new ResourceUnlock. * @memberof cs * @classdesc Represents a ResourceUnlock. * @implements IResourceUnlock * @constructor * @param {cs.IResourceUnlock=} [properties] Properties to set */ function ResourceUnlock(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]]; } /** * ResourceUnlock girlId. * @member {number} girlId * @memberof cs.ResourceUnlock * @instance */ ResourceUnlock.prototype.girlId = 0; /** * ResourceUnlock resId. * @member {number} resId * @memberof cs.ResourceUnlock * @instance */ ResourceUnlock.prototype.resId = 0; /** * Creates a new ResourceUnlock instance using the specified properties. * @function create * @memberof cs.ResourceUnlock * @static * @param {cs.IResourceUnlock=} [properties] Properties to set * @returns {cs.ResourceUnlock} ResourceUnlock instance */ ResourceUnlock.create = function create(properties) { return new ResourceUnlock(properties); }; /** * Encodes the specified ResourceUnlock message. Does not implicitly {@link cs.ResourceUnlock.verify|verify} messages. * @function encode * @memberof cs.ResourceUnlock * @static * @param {cs.IResourceUnlock} message ResourceUnlock message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ ResourceUnlock.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.girlId != null && Object.hasOwnProperty.call(message, "girlId")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.girlId); if (message.resId != null && Object.hasOwnProperty.call(message, "resId")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.resId); return writer; }; /** * Encodes the specified ResourceUnlock message, length delimited. Does not implicitly {@link cs.ResourceUnlock.verify|verify} messages. * @function encodeDelimited * @memberof cs.ResourceUnlock * @static * @param {cs.IResourceUnlock} message ResourceUnlock message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ ResourceUnlock.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a ResourceUnlock message from the specified reader or buffer. * @function decode * @memberof cs.ResourceUnlock * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {cs.ResourceUnlock} ResourceUnlock * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ ResourceUnlock.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.cs.ResourceUnlock(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { message.girlId = reader.int32(); break; } case 2: { message.resId = reader.int32(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a ResourceUnlock message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof cs.ResourceUnlock * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {cs.ResourceUnlock} ResourceUnlock * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ ResourceUnlock.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a ResourceUnlock message. * @function verify * @memberof cs.ResourceUnlock * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ ResourceUnlock.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.girlId != null && message.hasOwnProperty("girlId")) if (!$util.isInteger(message.girlId)) return "girlId: integer expected"; if (message.resId != null && message.hasOwnProperty("resId")) if (!$util.isInteger(message.resId)) return "resId: integer expected"; return null; }; /** * Creates a ResourceUnlock message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof cs.ResourceUnlock * @static * @param {Object.} object Plain object * @returns {cs.ResourceUnlock} ResourceUnlock */ ResourceUnlock.fromObject = function fromObject(object) { if (object instanceof $root.cs.ResourceUnlock) return object; var message = new $root.cs.ResourceUnlock(); if (object.girlId != null) message.girlId = object.girlId | 0; if (object.resId != null) message.resId = object.resId | 0; return message; }; /** * Creates a plain object from a ResourceUnlock message. Also converts values to other types if specified. * @function toObject * @memberof cs.ResourceUnlock * @static * @param {cs.ResourceUnlock} message ResourceUnlock * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ ResourceUnlock.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.girlId = 0; object.resId = 0; } if (message.girlId != null && message.hasOwnProperty("girlId")) object.girlId = message.girlId; if (message.resId != null && message.hasOwnProperty("resId")) object.resId = message.resId; return object; }; /** * Converts this ResourceUnlock to JSON. * @function toJSON * @memberof cs.ResourceUnlock * @instance * @returns {Object.} JSON object */ ResourceUnlock.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for ResourceUnlock * @function getTypeUrl * @memberof cs.ResourceUnlock * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ ResourceUnlock.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/cs.ResourceUnlock"; }; return ResourceUnlock; })(); cs.GirlData = (function() { /** * Properties of a GirlData. * @memberof cs * @interface IGirlData * @property {number|null} [id] GirlData id * @property {cs.IGirls|null} [girl] GirlData girl * @property {boolean|null} [isRelease] GirlData isRelease * @property {number|null} [star] GirlData star * @property {cs.IGirlsDetail|null} [detail] GirlData detail * @property {Array.|null} [images] GirlData images * @property {Array.|null} [videos] GirlData videos * @property {number|null} [chatTotalCount] GirlData chatTotalCount * @property {number|null} [chatRemainCount] GirlData chatRemainCount */ /** * Constructs a new GirlData. * @memberof cs * @classdesc Represents a GirlData. * @implements IGirlData * @constructor * @param {cs.IGirlData=} [properties] Properties to set */ function GirlData(properties) { this.images = []; this.videos = []; 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]]; } /** * GirlData id. * @member {number} id * @memberof cs.GirlData * @instance */ GirlData.prototype.id = 0; /** * GirlData girl. * @member {cs.IGirls|null|undefined} girl * @memberof cs.GirlData * @instance */ GirlData.prototype.girl = null; /** * GirlData isRelease. * @member {boolean} isRelease * @memberof cs.GirlData * @instance */ GirlData.prototype.isRelease = false; /** * GirlData star. * @member {number} star * @memberof cs.GirlData * @instance */ GirlData.prototype.star = 0; /** * GirlData detail. * @member {cs.IGirlsDetail|null|undefined} detail * @memberof cs.GirlData * @instance */ GirlData.prototype.detail = null; /** * GirlData images. * @member {Array.} images * @memberof cs.GirlData * @instance */ GirlData.prototype.images = $util.emptyArray; /** * GirlData videos. * @member {Array.} videos * @memberof cs.GirlData * @instance */ GirlData.prototype.videos = $util.emptyArray; /** * GirlData chatTotalCount. * @member {number} chatTotalCount * @memberof cs.GirlData * @instance */ GirlData.prototype.chatTotalCount = 0; /** * GirlData chatRemainCount. * @member {number} chatRemainCount * @memberof cs.GirlData * @instance */ GirlData.prototype.chatRemainCount = 0; /** * Creates a new GirlData instance using the specified properties. * @function create * @memberof cs.GirlData * @static * @param {cs.IGirlData=} [properties] Properties to set * @returns {cs.GirlData} GirlData instance */ GirlData.create = function create(properties) { return new GirlData(properties); }; /** * Encodes the specified GirlData message. Does not implicitly {@link cs.GirlData.verify|verify} messages. * @function encode * @memberof cs.GirlData * @static * @param {cs.IGirlData} message GirlData message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ GirlData.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.id != null && Object.hasOwnProperty.call(message, "id")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.id); if (message.girl != null && Object.hasOwnProperty.call(message, "girl")) $root.cs.Girls.encode(message.girl, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); if (message.isRelease != null && Object.hasOwnProperty.call(message, "isRelease")) writer.uint32(/* id 3, wireType 0 =*/24).bool(message.isRelease); if (message.star != null && Object.hasOwnProperty.call(message, "star")) writer.uint32(/* id 4, wireType 0 =*/32).int32(message.star); if (message.detail != null && Object.hasOwnProperty.call(message, "detail")) $root.cs.GirlsDetail.encode(message.detail, writer.uint32(/* id 30, wireType 2 =*/242).fork()).ldelim(); if (message.images != null && message.images.length) for (var i = 0; i < message.images.length; ++i) $root.cs.ResourceUnlock.encode(message.images[i], writer.uint32(/* id 31, wireType 2 =*/250).fork()).ldelim(); if (message.videos != null && message.videos.length) for (var i = 0; i < message.videos.length; ++i) $root.cs.ResourceUnlock.encode(message.videos[i], writer.uint32(/* id 32, wireType 2 =*/258).fork()).ldelim(); if (message.chatTotalCount != null && Object.hasOwnProperty.call(message, "chatTotalCount")) writer.uint32(/* id 34, wireType 0 =*/272).int32(message.chatTotalCount); if (message.chatRemainCount != null && Object.hasOwnProperty.call(message, "chatRemainCount")) writer.uint32(/* id 35, wireType 0 =*/280).int32(message.chatRemainCount); return writer; }; /** * Encodes the specified GirlData message, length delimited. Does not implicitly {@link cs.GirlData.verify|verify} messages. * @function encodeDelimited * @memberof cs.GirlData * @static * @param {cs.IGirlData} message GirlData message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ GirlData.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a GirlData message from the specified reader or buffer. * @function decode * @memberof cs.GirlData * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {cs.GirlData} GirlData * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ GirlData.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.cs.GirlData(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { message.id = reader.int32(); break; } case 2: { message.girl = $root.cs.Girls.decode(reader, reader.uint32()); break; } case 3: { message.isRelease = reader.bool(); break; } case 4: { message.star = reader.int32(); break; } case 30: { message.detail = $root.cs.GirlsDetail.decode(reader, reader.uint32()); break; } case 31: { if (!(message.images && message.images.length)) message.images = []; message.images.push($root.cs.ResourceUnlock.decode(reader, reader.uint32())); break; } case 32: { if (!(message.videos && message.videos.length)) message.videos = []; message.videos.push($root.cs.ResourceUnlock.decode(reader, reader.uint32())); break; } case 34: { message.chatTotalCount = reader.int32(); break; } case 35: { message.chatRemainCount = reader.int32(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a GirlData message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof cs.GirlData * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {cs.GirlData} GirlData * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ GirlData.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a GirlData message. * @function verify * @memberof cs.GirlData * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ GirlData.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.id != null && message.hasOwnProperty("id")) if (!$util.isInteger(message.id)) return "id: integer expected"; if (message.girl != null && message.hasOwnProperty("girl")) { var error = $root.cs.Girls.verify(message.girl); if (error) return "girl." + error; } if (message.isRelease != null && message.hasOwnProperty("isRelease")) if (typeof message.isRelease !== "boolean") return "isRelease: boolean expected"; if (message.star != null && message.hasOwnProperty("star")) if (!$util.isInteger(message.star)) return "star: integer expected"; if (message.detail != null && message.hasOwnProperty("detail")) { var error = $root.cs.GirlsDetail.verify(message.detail); if (error) return "detail." + error; } if (message.images != null && message.hasOwnProperty("images")) { if (!Array.isArray(message.images)) return "images: array expected"; for (var i = 0; i < message.images.length; ++i) { var error = $root.cs.ResourceUnlock.verify(message.images[i]); if (error) return "images." + error; } } if (message.videos != null && message.hasOwnProperty("videos")) { if (!Array.isArray(message.videos)) return "videos: array expected"; for (var i = 0; i < message.videos.length; ++i) { var error = $root.cs.ResourceUnlock.verify(message.videos[i]); if (error) return "videos." + error; } } if (message.chatTotalCount != null && message.hasOwnProperty("chatTotalCount")) if (!$util.isInteger(message.chatTotalCount)) return "chatTotalCount: integer expected"; if (message.chatRemainCount != null && message.hasOwnProperty("chatRemainCount")) if (!$util.isInteger(message.chatRemainCount)) return "chatRemainCount: integer expected"; return null; }; /** * Creates a GirlData message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof cs.GirlData * @static * @param {Object.} object Plain object * @returns {cs.GirlData} GirlData */ GirlData.fromObject = function fromObject(object) { if (object instanceof $root.cs.GirlData) return object; var message = new $root.cs.GirlData(); if (object.id != null) message.id = object.id | 0; if (object.girl != null) { if (typeof object.girl !== "object") throw TypeError(".cs.GirlData.girl: object expected"); message.girl = $root.cs.Girls.fromObject(object.girl); } if (object.isRelease != null) message.isRelease = Boolean(object.isRelease); if (object.star != null) message.star = object.star | 0; if (object.detail != null) { if (typeof object.detail !== "object") throw TypeError(".cs.GirlData.detail: object expected"); message.detail = $root.cs.GirlsDetail.fromObject(object.detail); } if (object.images) { if (!Array.isArray(object.images)) throw TypeError(".cs.GirlData.images: array expected"); message.images = []; for (var i = 0; i < object.images.length; ++i) { if (typeof object.images[i] !== "object") throw TypeError(".cs.GirlData.images: object expected"); message.images[i] = $root.cs.ResourceUnlock.fromObject(object.images[i]); } } if (object.videos) { if (!Array.isArray(object.videos)) throw TypeError(".cs.GirlData.videos: array expected"); message.videos = []; for (var i = 0; i < object.videos.length; ++i) { if (typeof object.videos[i] !== "object") throw TypeError(".cs.GirlData.videos: object expected"); message.videos[i] = $root.cs.ResourceUnlock.fromObject(object.videos[i]); } } if (object.chatTotalCount != null) message.chatTotalCount = object.chatTotalCount | 0; if (object.chatRemainCount != null) message.chatRemainCount = object.chatRemainCount | 0; return message; }; /** * Creates a plain object from a GirlData message. Also converts values to other types if specified. * @function toObject * @memberof cs.GirlData * @static * @param {cs.GirlData} message GirlData * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ GirlData.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) { object.images = []; object.videos = []; } if (options.defaults) { object.id = 0; object.girl = null; object.isRelease = false; object.star = 0; object.detail = null; object.chatTotalCount = 0; object.chatRemainCount = 0; } if (message.id != null && message.hasOwnProperty("id")) object.id = message.id; if (message.girl != null && message.hasOwnProperty("girl")) object.girl = $root.cs.Girls.toObject(message.girl, options); if (message.isRelease != null && message.hasOwnProperty("isRelease")) object.isRelease = message.isRelease; if (message.star != null && message.hasOwnProperty("star")) object.star = message.star; if (message.detail != null && message.hasOwnProperty("detail")) object.detail = $root.cs.GirlsDetail.toObject(message.detail, options); if (message.images && message.images.length) { object.images = []; for (var j = 0; j < message.images.length; ++j) object.images[j] = $root.cs.ResourceUnlock.toObject(message.images[j], options); } if (message.videos && message.videos.length) { object.videos = []; for (var j = 0; j < message.videos.length; ++j) object.videos[j] = $root.cs.ResourceUnlock.toObject(message.videos[j], options); } if (message.chatTotalCount != null && message.hasOwnProperty("chatTotalCount")) object.chatTotalCount = message.chatTotalCount; if (message.chatRemainCount != null && message.hasOwnProperty("chatRemainCount")) object.chatRemainCount = message.chatRemainCount; return object; }; /** * Converts this GirlData to JSON. * @function toJSON * @memberof cs.GirlData * @instance * @returns {Object.} JSON object */ GirlData.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for GirlData * @function getTypeUrl * @memberof cs.GirlData * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ GirlData.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/cs.GirlData"; }; return GirlData; })(); cs.CSGetGirlListReq = (function() { /** * Properties of a CSGetGirlListReq. * @memberof cs * @interface ICSGetGirlListReq * @property {number|null} [category] CSGetGirlListReq category * @property {number|null} [page] CSGetGirlListReq page * @property {number|null} [limit] CSGetGirlListReq limit */ /** * Constructs a new CSGetGirlListReq. * @memberof cs * @classdesc Represents a CSGetGirlListReq. * @implements ICSGetGirlListReq * @constructor * @param {cs.ICSGetGirlListReq=} [properties] Properties to set */ function CSGetGirlListReq(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]]; } /** * CSGetGirlListReq category. * @member {number} category * @memberof cs.CSGetGirlListReq * @instance */ CSGetGirlListReq.prototype.category = 0; /** * CSGetGirlListReq page. * @member {number} page * @memberof cs.CSGetGirlListReq * @instance */ CSGetGirlListReq.prototype.page = 0; /** * CSGetGirlListReq limit. * @member {number} limit * @memberof cs.CSGetGirlListReq * @instance */ CSGetGirlListReq.prototype.limit = 0; /** * Creates a new CSGetGirlListReq instance using the specified properties. * @function create * @memberof cs.CSGetGirlListReq * @static * @param {cs.ICSGetGirlListReq=} [properties] Properties to set * @returns {cs.CSGetGirlListReq} CSGetGirlListReq instance */ CSGetGirlListReq.create = function create(properties) { return new CSGetGirlListReq(properties); }; /** * Encodes the specified CSGetGirlListReq message. Does not implicitly {@link cs.CSGetGirlListReq.verify|verify} messages. * @function encode * @memberof cs.CSGetGirlListReq * @static * @param {cs.ICSGetGirlListReq} message CSGetGirlListReq message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSGetGirlListReq.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.category != null && Object.hasOwnProperty.call(message, "category")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.category); if (message.page != null && Object.hasOwnProperty.call(message, "page")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.page); if (message.limit != null && Object.hasOwnProperty.call(message, "limit")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.limit); return writer; }; /** * Encodes the specified CSGetGirlListReq message, length delimited. Does not implicitly {@link cs.CSGetGirlListReq.verify|verify} messages. * @function encodeDelimited * @memberof cs.CSGetGirlListReq * @static * @param {cs.ICSGetGirlListReq} message CSGetGirlListReq message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSGetGirlListReq.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a CSGetGirlListReq message from the specified reader or buffer. * @function decode * @memberof cs.CSGetGirlListReq * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {cs.CSGetGirlListReq} CSGetGirlListReq * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSGetGirlListReq.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.cs.CSGetGirlListReq(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { message.category = reader.int32(); break; } case 2: { message.page = reader.int32(); break; } case 3: { message.limit = reader.int32(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a CSGetGirlListReq message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof cs.CSGetGirlListReq * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {cs.CSGetGirlListReq} CSGetGirlListReq * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSGetGirlListReq.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a CSGetGirlListReq message. * @function verify * @memberof cs.CSGetGirlListReq * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ CSGetGirlListReq.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.category != null && message.hasOwnProperty("category")) if (!$util.isInteger(message.category)) return "category: integer expected"; if (message.page != null && message.hasOwnProperty("page")) if (!$util.isInteger(message.page)) return "page: integer expected"; if (message.limit != null && message.hasOwnProperty("limit")) if (!$util.isInteger(message.limit)) return "limit: integer expected"; return null; }; /** * Creates a CSGetGirlListReq message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof cs.CSGetGirlListReq * @static * @param {Object.} object Plain object * @returns {cs.CSGetGirlListReq} CSGetGirlListReq */ CSGetGirlListReq.fromObject = function fromObject(object) { if (object instanceof $root.cs.CSGetGirlListReq) return object; var message = new $root.cs.CSGetGirlListReq(); if (object.category != null) message.category = object.category | 0; if (object.page != null) message.page = object.page | 0; if (object.limit != null) message.limit = object.limit | 0; return message; }; /** * Creates a plain object from a CSGetGirlListReq message. Also converts values to other types if specified. * @function toObject * @memberof cs.CSGetGirlListReq * @static * @param {cs.CSGetGirlListReq} message CSGetGirlListReq * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ CSGetGirlListReq.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.category = 0; object.page = 0; object.limit = 0; } if (message.category != null && message.hasOwnProperty("category")) object.category = message.category; if (message.page != null && message.hasOwnProperty("page")) object.page = message.page; if (message.limit != null && message.hasOwnProperty("limit")) object.limit = message.limit; return object; }; /** * Converts this CSGetGirlListReq to JSON. * @function toJSON * @memberof cs.CSGetGirlListReq * @instance * @returns {Object.} JSON object */ CSGetGirlListReq.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for CSGetGirlListReq * @function getTypeUrl * @memberof cs.CSGetGirlListReq * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ CSGetGirlListReq.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/cs.CSGetGirlListReq"; }; return CSGetGirlListReq; })(); cs.CSGetGirlListRes = (function() { /** * Properties of a CSGetGirlListRes. * @memberof cs * @interface ICSGetGirlListRes * @property {Array.|null} [girls] CSGetGirlListRes girls */ /** * Constructs a new CSGetGirlListRes. * @memberof cs * @classdesc Represents a CSGetGirlListRes. * @implements ICSGetGirlListRes * @constructor * @param {cs.ICSGetGirlListRes=} [properties] Properties to set */ function CSGetGirlListRes(properties) { this.girls = []; 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]]; } /** * CSGetGirlListRes girls. * @member {Array.} girls * @memberof cs.CSGetGirlListRes * @instance */ CSGetGirlListRes.prototype.girls = $util.emptyArray; /** * Creates a new CSGetGirlListRes instance using the specified properties. * @function create * @memberof cs.CSGetGirlListRes * @static * @param {cs.ICSGetGirlListRes=} [properties] Properties to set * @returns {cs.CSGetGirlListRes} CSGetGirlListRes instance */ CSGetGirlListRes.create = function create(properties) { return new CSGetGirlListRes(properties); }; /** * Encodes the specified CSGetGirlListRes message. Does not implicitly {@link cs.CSGetGirlListRes.verify|verify} messages. * @function encode * @memberof cs.CSGetGirlListRes * @static * @param {cs.ICSGetGirlListRes} message CSGetGirlListRes message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSGetGirlListRes.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.girls != null && message.girls.length) for (var i = 0; i < message.girls.length; ++i) $root.cs.GirlData.encode(message.girls[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** * Encodes the specified CSGetGirlListRes message, length delimited. Does not implicitly {@link cs.CSGetGirlListRes.verify|verify} messages. * @function encodeDelimited * @memberof cs.CSGetGirlListRes * @static * @param {cs.ICSGetGirlListRes} message CSGetGirlListRes message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSGetGirlListRes.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a CSGetGirlListRes message from the specified reader or buffer. * @function decode * @memberof cs.CSGetGirlListRes * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {cs.CSGetGirlListRes} CSGetGirlListRes * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSGetGirlListRes.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.cs.CSGetGirlListRes(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { if (!(message.girls && message.girls.length)) message.girls = []; message.girls.push($root.cs.GirlData.decode(reader, reader.uint32())); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a CSGetGirlListRes message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof cs.CSGetGirlListRes * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {cs.CSGetGirlListRes} CSGetGirlListRes * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSGetGirlListRes.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a CSGetGirlListRes message. * @function verify * @memberof cs.CSGetGirlListRes * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ CSGetGirlListRes.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.girls != null && message.hasOwnProperty("girls")) { if (!Array.isArray(message.girls)) return "girls: array expected"; for (var i = 0; i < message.girls.length; ++i) { var error = $root.cs.GirlData.verify(message.girls[i]); if (error) return "girls." + error; } } return null; }; /** * Creates a CSGetGirlListRes message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof cs.CSGetGirlListRes * @static * @param {Object.} object Plain object * @returns {cs.CSGetGirlListRes} CSGetGirlListRes */ CSGetGirlListRes.fromObject = function fromObject(object) { if (object instanceof $root.cs.CSGetGirlListRes) return object; var message = new $root.cs.CSGetGirlListRes(); if (object.girls) { if (!Array.isArray(object.girls)) throw TypeError(".cs.CSGetGirlListRes.girls: array expected"); message.girls = []; for (var i = 0; i < object.girls.length; ++i) { if (typeof object.girls[i] !== "object") throw TypeError(".cs.CSGetGirlListRes.girls: object expected"); message.girls[i] = $root.cs.GirlData.fromObject(object.girls[i]); } } return message; }; /** * Creates a plain object from a CSGetGirlListRes message. Also converts values to other types if specified. * @function toObject * @memberof cs.CSGetGirlListRes * @static * @param {cs.CSGetGirlListRes} message CSGetGirlListRes * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ CSGetGirlListRes.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) object.girls = []; if (message.girls && message.girls.length) { object.girls = []; for (var j = 0; j < message.girls.length; ++j) object.girls[j] = $root.cs.GirlData.toObject(message.girls[j], options); } return object; }; /** * Converts this CSGetGirlListRes to JSON. * @function toJSON * @memberof cs.CSGetGirlListRes * @instance * @returns {Object.} JSON object */ CSGetGirlListRes.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for CSGetGirlListRes * @function getTypeUrl * @memberof cs.CSGetGirlListRes * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ CSGetGirlListRes.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/cs.CSGetGirlListRes"; }; return CSGetGirlListRes; })(); cs.CSGetGirlDetailReq = (function() { /** * Properties of a CSGetGirlDetailReq. * @memberof cs * @interface ICSGetGirlDetailReq * @property {number|null} [id] CSGetGirlDetailReq id */ /** * Constructs a new CSGetGirlDetailReq. * @memberof cs * @classdesc Represents a CSGetGirlDetailReq. * @implements ICSGetGirlDetailReq * @constructor * @param {cs.ICSGetGirlDetailReq=} [properties] Properties to set */ function CSGetGirlDetailReq(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]]; } /** * CSGetGirlDetailReq id. * @member {number} id * @memberof cs.CSGetGirlDetailReq * @instance */ CSGetGirlDetailReq.prototype.id = 0; /** * Creates a new CSGetGirlDetailReq instance using the specified properties. * @function create * @memberof cs.CSGetGirlDetailReq * @static * @param {cs.ICSGetGirlDetailReq=} [properties] Properties to set * @returns {cs.CSGetGirlDetailReq} CSGetGirlDetailReq instance */ CSGetGirlDetailReq.create = function create(properties) { return new CSGetGirlDetailReq(properties); }; /** * Encodes the specified CSGetGirlDetailReq message. Does not implicitly {@link cs.CSGetGirlDetailReq.verify|verify} messages. * @function encode * @memberof cs.CSGetGirlDetailReq * @static * @param {cs.ICSGetGirlDetailReq} message CSGetGirlDetailReq message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSGetGirlDetailReq.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.id != null && Object.hasOwnProperty.call(message, "id")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.id); return writer; }; /** * Encodes the specified CSGetGirlDetailReq message, length delimited. Does not implicitly {@link cs.CSGetGirlDetailReq.verify|verify} messages. * @function encodeDelimited * @memberof cs.CSGetGirlDetailReq * @static * @param {cs.ICSGetGirlDetailReq} message CSGetGirlDetailReq message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSGetGirlDetailReq.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a CSGetGirlDetailReq message from the specified reader or buffer. * @function decode * @memberof cs.CSGetGirlDetailReq * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {cs.CSGetGirlDetailReq} CSGetGirlDetailReq * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSGetGirlDetailReq.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.cs.CSGetGirlDetailReq(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { message.id = reader.int32(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a CSGetGirlDetailReq message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof cs.CSGetGirlDetailReq * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {cs.CSGetGirlDetailReq} CSGetGirlDetailReq * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSGetGirlDetailReq.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a CSGetGirlDetailReq message. * @function verify * @memberof cs.CSGetGirlDetailReq * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ CSGetGirlDetailReq.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.id != null && message.hasOwnProperty("id")) if (!$util.isInteger(message.id)) return "id: integer expected"; return null; }; /** * Creates a CSGetGirlDetailReq message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof cs.CSGetGirlDetailReq * @static * @param {Object.} object Plain object * @returns {cs.CSGetGirlDetailReq} CSGetGirlDetailReq */ CSGetGirlDetailReq.fromObject = function fromObject(object) { if (object instanceof $root.cs.CSGetGirlDetailReq) return object; var message = new $root.cs.CSGetGirlDetailReq(); if (object.id != null) message.id = object.id | 0; return message; }; /** * Creates a plain object from a CSGetGirlDetailReq message. Also converts values to other types if specified. * @function toObject * @memberof cs.CSGetGirlDetailReq * @static * @param {cs.CSGetGirlDetailReq} message CSGetGirlDetailReq * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ CSGetGirlDetailReq.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) object.id = 0; if (message.id != null && message.hasOwnProperty("id")) object.id = message.id; return object; }; /** * Converts this CSGetGirlDetailReq to JSON. * @function toJSON * @memberof cs.CSGetGirlDetailReq * @instance * @returns {Object.} JSON object */ CSGetGirlDetailReq.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for CSGetGirlDetailReq * @function getTypeUrl * @memberof cs.CSGetGirlDetailReq * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ CSGetGirlDetailReq.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/cs.CSGetGirlDetailReq"; }; return CSGetGirlDetailReq; })(); cs.CSGetGirlDetailRes = (function() { /** * Properties of a CSGetGirlDetailRes. * @memberof cs * @interface ICSGetGirlDetailRes * @property {cs.IGirlData|null} [girl] CSGetGirlDetailRes girl */ /** * Constructs a new CSGetGirlDetailRes. * @memberof cs * @classdesc Represents a CSGetGirlDetailRes. * @implements ICSGetGirlDetailRes * @constructor * @param {cs.ICSGetGirlDetailRes=} [properties] Properties to set */ function CSGetGirlDetailRes(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]]; } /** * CSGetGirlDetailRes girl. * @member {cs.IGirlData|null|undefined} girl * @memberof cs.CSGetGirlDetailRes * @instance */ CSGetGirlDetailRes.prototype.girl = null; /** * Creates a new CSGetGirlDetailRes instance using the specified properties. * @function create * @memberof cs.CSGetGirlDetailRes * @static * @param {cs.ICSGetGirlDetailRes=} [properties] Properties to set * @returns {cs.CSGetGirlDetailRes} CSGetGirlDetailRes instance */ CSGetGirlDetailRes.create = function create(properties) { return new CSGetGirlDetailRes(properties); }; /** * Encodes the specified CSGetGirlDetailRes message. Does not implicitly {@link cs.CSGetGirlDetailRes.verify|verify} messages. * @function encode * @memberof cs.CSGetGirlDetailRes * @static * @param {cs.ICSGetGirlDetailRes} message CSGetGirlDetailRes message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSGetGirlDetailRes.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.girl != null && Object.hasOwnProperty.call(message, "girl")) $root.cs.GirlData.encode(message.girl, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** * Encodes the specified CSGetGirlDetailRes message, length delimited. Does not implicitly {@link cs.CSGetGirlDetailRes.verify|verify} messages. * @function encodeDelimited * @memberof cs.CSGetGirlDetailRes * @static * @param {cs.ICSGetGirlDetailRes} message CSGetGirlDetailRes message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSGetGirlDetailRes.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a CSGetGirlDetailRes message from the specified reader or buffer. * @function decode * @memberof cs.CSGetGirlDetailRes * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {cs.CSGetGirlDetailRes} CSGetGirlDetailRes * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSGetGirlDetailRes.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.cs.CSGetGirlDetailRes(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { message.girl = $root.cs.GirlData.decode(reader, reader.uint32()); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a CSGetGirlDetailRes message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof cs.CSGetGirlDetailRes * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {cs.CSGetGirlDetailRes} CSGetGirlDetailRes * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSGetGirlDetailRes.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a CSGetGirlDetailRes message. * @function verify * @memberof cs.CSGetGirlDetailRes * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ CSGetGirlDetailRes.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.girl != null && message.hasOwnProperty("girl")) { var error = $root.cs.GirlData.verify(message.girl); if (error) return "girl." + error; } return null; }; /** * Creates a CSGetGirlDetailRes message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof cs.CSGetGirlDetailRes * @static * @param {Object.} object Plain object * @returns {cs.CSGetGirlDetailRes} CSGetGirlDetailRes */ CSGetGirlDetailRes.fromObject = function fromObject(object) { if (object instanceof $root.cs.CSGetGirlDetailRes) return object; var message = new $root.cs.CSGetGirlDetailRes(); if (object.girl != null) { if (typeof object.girl !== "object") throw TypeError(".cs.CSGetGirlDetailRes.girl: object expected"); message.girl = $root.cs.GirlData.fromObject(object.girl); } return message; }; /** * Creates a plain object from a CSGetGirlDetailRes message. Also converts values to other types if specified. * @function toObject * @memberof cs.CSGetGirlDetailRes * @static * @param {cs.CSGetGirlDetailRes} message CSGetGirlDetailRes * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ CSGetGirlDetailRes.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) object.girl = null; if (message.girl != null && message.hasOwnProperty("girl")) object.girl = $root.cs.GirlData.toObject(message.girl, options); return object; }; /** * Converts this CSGetGirlDetailRes to JSON. * @function toJSON * @memberof cs.CSGetGirlDetailRes * @instance * @returns {Object.} JSON object */ CSGetGirlDetailRes.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for CSGetGirlDetailRes * @function getTypeUrl * @memberof cs.CSGetGirlDetailRes * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ CSGetGirlDetailRes.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/cs.CSGetGirlDetailRes"; }; return CSGetGirlDetailRes; })(); cs.CSUnlockGirlReq = (function() { /** * Properties of a CSUnlockGirlReq. * @memberof cs * @interface ICSUnlockGirlReq * @property {number|null} [id] CSUnlockGirlReq id */ /** * Constructs a new CSUnlockGirlReq. * @memberof cs * @classdesc Represents a CSUnlockGirlReq. * @implements ICSUnlockGirlReq * @constructor * @param {cs.ICSUnlockGirlReq=} [properties] Properties to set */ function CSUnlockGirlReq(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]]; } /** * CSUnlockGirlReq id. * @member {number} id * @memberof cs.CSUnlockGirlReq * @instance */ CSUnlockGirlReq.prototype.id = 0; /** * Creates a new CSUnlockGirlReq instance using the specified properties. * @function create * @memberof cs.CSUnlockGirlReq * @static * @param {cs.ICSUnlockGirlReq=} [properties] Properties to set * @returns {cs.CSUnlockGirlReq} CSUnlockGirlReq instance */ CSUnlockGirlReq.create = function create(properties) { return new CSUnlockGirlReq(properties); }; /** * Encodes the specified CSUnlockGirlReq message. Does not implicitly {@link cs.CSUnlockGirlReq.verify|verify} messages. * @function encode * @memberof cs.CSUnlockGirlReq * @static * @param {cs.ICSUnlockGirlReq} message CSUnlockGirlReq message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSUnlockGirlReq.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.id != null && Object.hasOwnProperty.call(message, "id")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.id); return writer; }; /** * Encodes the specified CSUnlockGirlReq message, length delimited. Does not implicitly {@link cs.CSUnlockGirlReq.verify|verify} messages. * @function encodeDelimited * @memberof cs.CSUnlockGirlReq * @static * @param {cs.ICSUnlockGirlReq} message CSUnlockGirlReq message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSUnlockGirlReq.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a CSUnlockGirlReq message from the specified reader or buffer. * @function decode * @memberof cs.CSUnlockGirlReq * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {cs.CSUnlockGirlReq} CSUnlockGirlReq * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSUnlockGirlReq.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.cs.CSUnlockGirlReq(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { message.id = reader.int32(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a CSUnlockGirlReq message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof cs.CSUnlockGirlReq * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {cs.CSUnlockGirlReq} CSUnlockGirlReq * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSUnlockGirlReq.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a CSUnlockGirlReq message. * @function verify * @memberof cs.CSUnlockGirlReq * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ CSUnlockGirlReq.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.id != null && message.hasOwnProperty("id")) if (!$util.isInteger(message.id)) return "id: integer expected"; return null; }; /** * Creates a CSUnlockGirlReq message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof cs.CSUnlockGirlReq * @static * @param {Object.} object Plain object * @returns {cs.CSUnlockGirlReq} CSUnlockGirlReq */ CSUnlockGirlReq.fromObject = function fromObject(object) { if (object instanceof $root.cs.CSUnlockGirlReq) return object; var message = new $root.cs.CSUnlockGirlReq(); if (object.id != null) message.id = object.id | 0; return message; }; /** * Creates a plain object from a CSUnlockGirlReq message. Also converts values to other types if specified. * @function toObject * @memberof cs.CSUnlockGirlReq * @static * @param {cs.CSUnlockGirlReq} message CSUnlockGirlReq * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ CSUnlockGirlReq.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) object.id = 0; if (message.id != null && message.hasOwnProperty("id")) object.id = message.id; return object; }; /** * Converts this CSUnlockGirlReq to JSON. * @function toJSON * @memberof cs.CSUnlockGirlReq * @instance * @returns {Object.} JSON object */ CSUnlockGirlReq.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for CSUnlockGirlReq * @function getTypeUrl * @memberof cs.CSUnlockGirlReq * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ CSUnlockGirlReq.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/cs.CSUnlockGirlReq"; }; return CSUnlockGirlReq; })(); cs.CSUnlockGirlRes = (function() { /** * Properties of a CSUnlockGirlRes. * @memberof cs * @interface ICSUnlockGirlRes * @property {number|Long|null} [balance] CSUnlockGirlRes balance * @property {number|Long|null} [vipExpire] CSUnlockGirlRes vipExpire */ /** * Constructs a new CSUnlockGirlRes. * @memberof cs * @classdesc Represents a CSUnlockGirlRes. * @implements ICSUnlockGirlRes * @constructor * @param {cs.ICSUnlockGirlRes=} [properties] Properties to set */ function CSUnlockGirlRes(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]]; } /** * CSUnlockGirlRes balance. * @member {number|Long} balance * @memberof cs.CSUnlockGirlRes * @instance */ CSUnlockGirlRes.prototype.balance = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * CSUnlockGirlRes vipExpire. * @member {number|Long} vipExpire * @memberof cs.CSUnlockGirlRes * @instance */ CSUnlockGirlRes.prototype.vipExpire = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new CSUnlockGirlRes instance using the specified properties. * @function create * @memberof cs.CSUnlockGirlRes * @static * @param {cs.ICSUnlockGirlRes=} [properties] Properties to set * @returns {cs.CSUnlockGirlRes} CSUnlockGirlRes instance */ CSUnlockGirlRes.create = function create(properties) { return new CSUnlockGirlRes(properties); }; /** * Encodes the specified CSUnlockGirlRes message. Does not implicitly {@link cs.CSUnlockGirlRes.verify|verify} messages. * @function encode * @memberof cs.CSUnlockGirlRes * @static * @param {cs.ICSUnlockGirlRes} message CSUnlockGirlRes message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSUnlockGirlRes.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.balance != null && Object.hasOwnProperty.call(message, "balance")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.balance); if (message.vipExpire != null && Object.hasOwnProperty.call(message, "vipExpire")) writer.uint32(/* id 2, wireType 0 =*/16).int64(message.vipExpire); return writer; }; /** * Encodes the specified CSUnlockGirlRes message, length delimited. Does not implicitly {@link cs.CSUnlockGirlRes.verify|verify} messages. * @function encodeDelimited * @memberof cs.CSUnlockGirlRes * @static * @param {cs.ICSUnlockGirlRes} message CSUnlockGirlRes message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSUnlockGirlRes.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a CSUnlockGirlRes message from the specified reader or buffer. * @function decode * @memberof cs.CSUnlockGirlRes * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {cs.CSUnlockGirlRes} CSUnlockGirlRes * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSUnlockGirlRes.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.cs.CSUnlockGirlRes(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { message.balance = reader.int64(); break; } case 2: { message.vipExpire = reader.int64(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a CSUnlockGirlRes message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof cs.CSUnlockGirlRes * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {cs.CSUnlockGirlRes} CSUnlockGirlRes * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSUnlockGirlRes.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a CSUnlockGirlRes message. * @function verify * @memberof cs.CSUnlockGirlRes * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ CSUnlockGirlRes.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.balance != null && message.hasOwnProperty("balance")) if (!$util.isInteger(message.balance) && !(message.balance && $util.isInteger(message.balance.low) && $util.isInteger(message.balance.high))) return "balance: integer|Long expected"; if (message.vipExpire != null && message.hasOwnProperty("vipExpire")) if (!$util.isInteger(message.vipExpire) && !(message.vipExpire && $util.isInteger(message.vipExpire.low) && $util.isInteger(message.vipExpire.high))) return "vipExpire: integer|Long expected"; return null; }; /** * Creates a CSUnlockGirlRes message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof cs.CSUnlockGirlRes * @static * @param {Object.} object Plain object * @returns {cs.CSUnlockGirlRes} CSUnlockGirlRes */ CSUnlockGirlRes.fromObject = function fromObject(object) { if (object instanceof $root.cs.CSUnlockGirlRes) return object; var message = new $root.cs.CSUnlockGirlRes(); if (object.balance != null) if ($util.Long) (message.balance = $util.Long.fromValue(object.balance)).unsigned = false; else if (typeof object.balance === "string") message.balance = parseInt(object.balance, 10); else if (typeof object.balance === "number") message.balance = object.balance; else if (typeof object.balance === "object") message.balance = new $util.LongBits(object.balance.low >>> 0, object.balance.high >>> 0).toNumber(); if (object.vipExpire != null) if ($util.Long) (message.vipExpire = $util.Long.fromValue(object.vipExpire)).unsigned = false; else if (typeof object.vipExpire === "string") message.vipExpire = parseInt(object.vipExpire, 10); else if (typeof object.vipExpire === "number") message.vipExpire = object.vipExpire; else if (typeof object.vipExpire === "object") message.vipExpire = new $util.LongBits(object.vipExpire.low >>> 0, object.vipExpire.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from a CSUnlockGirlRes message. Also converts values to other types if specified. * @function toObject * @memberof cs.CSUnlockGirlRes * @static * @param {cs.CSUnlockGirlRes} message CSUnlockGirlRes * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ CSUnlockGirlRes.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.balance = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.balance = options.longs === String ? "0" : 0; if ($util.Long) { var long = new $util.Long(0, 0, false); object.vipExpire = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.vipExpire = options.longs === String ? "0" : 0; } if (message.balance != null && message.hasOwnProperty("balance")) if (typeof message.balance === "number") object.balance = options.longs === String ? String(message.balance) : message.balance; else object.balance = options.longs === String ? $util.Long.prototype.toString.call(message.balance) : options.longs === Number ? new $util.LongBits(message.balance.low >>> 0, message.balance.high >>> 0).toNumber() : message.balance; if (message.vipExpire != null && message.hasOwnProperty("vipExpire")) if (typeof message.vipExpire === "number") object.vipExpire = options.longs === String ? String(message.vipExpire) : message.vipExpire; else object.vipExpire = options.longs === String ? $util.Long.prototype.toString.call(message.vipExpire) : options.longs === Number ? new $util.LongBits(message.vipExpire.low >>> 0, message.vipExpire.high >>> 0).toNumber() : message.vipExpire; return object; }; /** * Converts this CSUnlockGirlRes to JSON. * @function toJSON * @memberof cs.CSUnlockGirlRes * @instance * @returns {Object.} JSON object */ CSUnlockGirlRes.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for CSUnlockGirlRes * @function getTypeUrl * @memberof cs.CSUnlockGirlRes * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ CSUnlockGirlRes.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/cs.CSUnlockGirlRes"; }; return CSUnlockGirlRes; })(); /** * EnmResType enum. * @name cs.EnmResType * @enum {number} * @property {number} ERT_Image=0 ERT_Image value * @property {number} ERT_Video=1 ERT_Video value */ cs.EnmResType = (function() { var valuesById = {}, values = Object.create(valuesById); values[valuesById[0] = "ERT_Image"] = 0; values[valuesById[1] = "ERT_Video"] = 1; return values; })(); cs.CSUnlockResourceReq = (function() { /** * Properties of a CSUnlockResourceReq. * @memberof cs * @interface ICSUnlockResourceReq * @property {number|null} [girlId] CSUnlockResourceReq girlId * @property {number|null} [resId] CSUnlockResourceReq resId * @property {number|null} [type] CSUnlockResourceReq type */ /** * Constructs a new CSUnlockResourceReq. * @memberof cs * @classdesc Represents a CSUnlockResourceReq. * @implements ICSUnlockResourceReq * @constructor * @param {cs.ICSUnlockResourceReq=} [properties] Properties to set */ function CSUnlockResourceReq(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]]; } /** * CSUnlockResourceReq girlId. * @member {number} girlId * @memberof cs.CSUnlockResourceReq * @instance */ CSUnlockResourceReq.prototype.girlId = 0; /** * CSUnlockResourceReq resId. * @member {number} resId * @memberof cs.CSUnlockResourceReq * @instance */ CSUnlockResourceReq.prototype.resId = 0; /** * CSUnlockResourceReq type. * @member {number} type * @memberof cs.CSUnlockResourceReq * @instance */ CSUnlockResourceReq.prototype.type = 0; /** * Creates a new CSUnlockResourceReq instance using the specified properties. * @function create * @memberof cs.CSUnlockResourceReq * @static * @param {cs.ICSUnlockResourceReq=} [properties] Properties to set * @returns {cs.CSUnlockResourceReq} CSUnlockResourceReq instance */ CSUnlockResourceReq.create = function create(properties) { return new CSUnlockResourceReq(properties); }; /** * Encodes the specified CSUnlockResourceReq message. Does not implicitly {@link cs.CSUnlockResourceReq.verify|verify} messages. * @function encode * @memberof cs.CSUnlockResourceReq * @static * @param {cs.ICSUnlockResourceReq} message CSUnlockResourceReq message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSUnlockResourceReq.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.girlId != null && Object.hasOwnProperty.call(message, "girlId")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.girlId); if (message.resId != null && Object.hasOwnProperty.call(message, "resId")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.resId); if (message.type != null && Object.hasOwnProperty.call(message, "type")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.type); return writer; }; /** * Encodes the specified CSUnlockResourceReq message, length delimited. Does not implicitly {@link cs.CSUnlockResourceReq.verify|verify} messages. * @function encodeDelimited * @memberof cs.CSUnlockResourceReq * @static * @param {cs.ICSUnlockResourceReq} message CSUnlockResourceReq message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSUnlockResourceReq.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a CSUnlockResourceReq message from the specified reader or buffer. * @function decode * @memberof cs.CSUnlockResourceReq * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {cs.CSUnlockResourceReq} CSUnlockResourceReq * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSUnlockResourceReq.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.cs.CSUnlockResourceReq(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { message.girlId = reader.int32(); break; } case 2: { message.resId = reader.int32(); break; } case 3: { message.type = reader.int32(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a CSUnlockResourceReq message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof cs.CSUnlockResourceReq * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {cs.CSUnlockResourceReq} CSUnlockResourceReq * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSUnlockResourceReq.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a CSUnlockResourceReq message. * @function verify * @memberof cs.CSUnlockResourceReq * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ CSUnlockResourceReq.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.girlId != null && message.hasOwnProperty("girlId")) if (!$util.isInteger(message.girlId)) return "girlId: integer expected"; if (message.resId != null && message.hasOwnProperty("resId")) if (!$util.isInteger(message.resId)) return "resId: integer expected"; if (message.type != null && message.hasOwnProperty("type")) if (!$util.isInteger(message.type)) return "type: integer expected"; return null; }; /** * Creates a CSUnlockResourceReq message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof cs.CSUnlockResourceReq * @static * @param {Object.} object Plain object * @returns {cs.CSUnlockResourceReq} CSUnlockResourceReq */ CSUnlockResourceReq.fromObject = function fromObject(object) { if (object instanceof $root.cs.CSUnlockResourceReq) return object; var message = new $root.cs.CSUnlockResourceReq(); if (object.girlId != null) message.girlId = object.girlId | 0; if (object.resId != null) message.resId = object.resId | 0; if (object.type != null) message.type = object.type | 0; return message; }; /** * Creates a plain object from a CSUnlockResourceReq message. Also converts values to other types if specified. * @function toObject * @memberof cs.CSUnlockResourceReq * @static * @param {cs.CSUnlockResourceReq} message CSUnlockResourceReq * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ CSUnlockResourceReq.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.girlId = 0; object.resId = 0; object.type = 0; } if (message.girlId != null && message.hasOwnProperty("girlId")) object.girlId = message.girlId; if (message.resId != null && message.hasOwnProperty("resId")) object.resId = message.resId; if (message.type != null && message.hasOwnProperty("type")) object.type = message.type; return object; }; /** * Converts this CSUnlockResourceReq to JSON. * @function toJSON * @memberof cs.CSUnlockResourceReq * @instance * @returns {Object.} JSON object */ CSUnlockResourceReq.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for CSUnlockResourceReq * @function getTypeUrl * @memberof cs.CSUnlockResourceReq * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ CSUnlockResourceReq.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/cs.CSUnlockResourceReq"; }; return CSUnlockResourceReq; })(); cs.CSUnlockResourceRes = (function() { /** * Properties of a CSUnlockResourceRes. * @memberof cs * @interface ICSUnlockResourceRes * @property {number|Long|null} [balance] CSUnlockResourceRes balance * @property {number|Long|null} [vipExpire] CSUnlockResourceRes vipExpire */ /** * Constructs a new CSUnlockResourceRes. * @memberof cs * @classdesc Represents a CSUnlockResourceRes. * @implements ICSUnlockResourceRes * @constructor * @param {cs.ICSUnlockResourceRes=} [properties] Properties to set */ function CSUnlockResourceRes(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]]; } /** * CSUnlockResourceRes balance. * @member {number|Long} balance * @memberof cs.CSUnlockResourceRes * @instance */ CSUnlockResourceRes.prototype.balance = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * CSUnlockResourceRes vipExpire. * @member {number|Long} vipExpire * @memberof cs.CSUnlockResourceRes * @instance */ CSUnlockResourceRes.prototype.vipExpire = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new CSUnlockResourceRes instance using the specified properties. * @function create * @memberof cs.CSUnlockResourceRes * @static * @param {cs.ICSUnlockResourceRes=} [properties] Properties to set * @returns {cs.CSUnlockResourceRes} CSUnlockResourceRes instance */ CSUnlockResourceRes.create = function create(properties) { return new CSUnlockResourceRes(properties); }; /** * Encodes the specified CSUnlockResourceRes message. Does not implicitly {@link cs.CSUnlockResourceRes.verify|verify} messages. * @function encode * @memberof cs.CSUnlockResourceRes * @static * @param {cs.ICSUnlockResourceRes} message CSUnlockResourceRes message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSUnlockResourceRes.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.balance != null && Object.hasOwnProperty.call(message, "balance")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.balance); if (message.vipExpire != null && Object.hasOwnProperty.call(message, "vipExpire")) writer.uint32(/* id 2, wireType 0 =*/16).int64(message.vipExpire); return writer; }; /** * Encodes the specified CSUnlockResourceRes message, length delimited. Does not implicitly {@link cs.CSUnlockResourceRes.verify|verify} messages. * @function encodeDelimited * @memberof cs.CSUnlockResourceRes * @static * @param {cs.ICSUnlockResourceRes} message CSUnlockResourceRes message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSUnlockResourceRes.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a CSUnlockResourceRes message from the specified reader or buffer. * @function decode * @memberof cs.CSUnlockResourceRes * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {cs.CSUnlockResourceRes} CSUnlockResourceRes * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSUnlockResourceRes.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.cs.CSUnlockResourceRes(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { message.balance = reader.int64(); break; } case 2: { message.vipExpire = reader.int64(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a CSUnlockResourceRes message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof cs.CSUnlockResourceRes * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {cs.CSUnlockResourceRes} CSUnlockResourceRes * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSUnlockResourceRes.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a CSUnlockResourceRes message. * @function verify * @memberof cs.CSUnlockResourceRes * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ CSUnlockResourceRes.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.balance != null && message.hasOwnProperty("balance")) if (!$util.isInteger(message.balance) && !(message.balance && $util.isInteger(message.balance.low) && $util.isInteger(message.balance.high))) return "balance: integer|Long expected"; if (message.vipExpire != null && message.hasOwnProperty("vipExpire")) if (!$util.isInteger(message.vipExpire) && !(message.vipExpire && $util.isInteger(message.vipExpire.low) && $util.isInteger(message.vipExpire.high))) return "vipExpire: integer|Long expected"; return null; }; /** * Creates a CSUnlockResourceRes message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof cs.CSUnlockResourceRes * @static * @param {Object.} object Plain object * @returns {cs.CSUnlockResourceRes} CSUnlockResourceRes */ CSUnlockResourceRes.fromObject = function fromObject(object) { if (object instanceof $root.cs.CSUnlockResourceRes) return object; var message = new $root.cs.CSUnlockResourceRes(); if (object.balance != null) if ($util.Long) (message.balance = $util.Long.fromValue(object.balance)).unsigned = false; else if (typeof object.balance === "string") message.balance = parseInt(object.balance, 10); else if (typeof object.balance === "number") message.balance = object.balance; else if (typeof object.balance === "object") message.balance = new $util.LongBits(object.balance.low >>> 0, object.balance.high >>> 0).toNumber(); if (object.vipExpire != null) if ($util.Long) (message.vipExpire = $util.Long.fromValue(object.vipExpire)).unsigned = false; else if (typeof object.vipExpire === "string") message.vipExpire = parseInt(object.vipExpire, 10); else if (typeof object.vipExpire === "number") message.vipExpire = object.vipExpire; else if (typeof object.vipExpire === "object") message.vipExpire = new $util.LongBits(object.vipExpire.low >>> 0, object.vipExpire.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from a CSUnlockResourceRes message. Also converts values to other types if specified. * @function toObject * @memberof cs.CSUnlockResourceRes * @static * @param {cs.CSUnlockResourceRes} message CSUnlockResourceRes * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ CSUnlockResourceRes.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.balance = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.balance = options.longs === String ? "0" : 0; if ($util.Long) { var long = new $util.Long(0, 0, false); object.vipExpire = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.vipExpire = options.longs === String ? "0" : 0; } if (message.balance != null && message.hasOwnProperty("balance")) if (typeof message.balance === "number") object.balance = options.longs === String ? String(message.balance) : message.balance; else object.balance = options.longs === String ? $util.Long.prototype.toString.call(message.balance) : options.longs === Number ? new $util.LongBits(message.balance.low >>> 0, message.balance.high >>> 0).toNumber() : message.balance; if (message.vipExpire != null && message.hasOwnProperty("vipExpire")) if (typeof message.vipExpire === "number") object.vipExpire = options.longs === String ? String(message.vipExpire) : message.vipExpire; else object.vipExpire = options.longs === String ? $util.Long.prototype.toString.call(message.vipExpire) : options.longs === Number ? new $util.LongBits(message.vipExpire.low >>> 0, message.vipExpire.high >>> 0).toNumber() : message.vipExpire; return object; }; /** * Converts this CSUnlockResourceRes to JSON. * @function toJSON * @memberof cs.CSUnlockResourceRes * @instance * @returns {Object.} JSON object */ CSUnlockResourceRes.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for CSUnlockResourceRes * @function getTypeUrl * @memberof cs.CSUnlockResourceRes * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ CSUnlockResourceRes.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/cs.CSUnlockResourceRes"; }; return CSUnlockResourceRes; })(); cs.CSBuyGoodReq = (function() { /** * Properties of a CSBuyGoodReq. * @memberof cs * @interface ICSBuyGoodReq * @property {number|null} [goodId] CSBuyGoodReq goodId * @property {number|null} [girlId] CSBuyGoodReq girlId */ /** * Constructs a new CSBuyGoodReq. * @memberof cs * @classdesc Represents a CSBuyGoodReq. * @implements ICSBuyGoodReq * @constructor * @param {cs.ICSBuyGoodReq=} [properties] Properties to set */ function CSBuyGoodReq(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]]; } /** * CSBuyGoodReq goodId. * @member {number} goodId * @memberof cs.CSBuyGoodReq * @instance */ CSBuyGoodReq.prototype.goodId = 0; /** * CSBuyGoodReq girlId. * @member {number} girlId * @memberof cs.CSBuyGoodReq * @instance */ CSBuyGoodReq.prototype.girlId = 0; /** * Creates a new CSBuyGoodReq instance using the specified properties. * @function create * @memberof cs.CSBuyGoodReq * @static * @param {cs.ICSBuyGoodReq=} [properties] Properties to set * @returns {cs.CSBuyGoodReq} CSBuyGoodReq instance */ CSBuyGoodReq.create = function create(properties) { return new CSBuyGoodReq(properties); }; /** * Encodes the specified CSBuyGoodReq message. Does not implicitly {@link cs.CSBuyGoodReq.verify|verify} messages. * @function encode * @memberof cs.CSBuyGoodReq * @static * @param {cs.ICSBuyGoodReq} message CSBuyGoodReq message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSBuyGoodReq.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.goodId != null && Object.hasOwnProperty.call(message, "goodId")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.goodId); if (message.girlId != null && Object.hasOwnProperty.call(message, "girlId")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.girlId); return writer; }; /** * Encodes the specified CSBuyGoodReq message, length delimited. Does not implicitly {@link cs.CSBuyGoodReq.verify|verify} messages. * @function encodeDelimited * @memberof cs.CSBuyGoodReq * @static * @param {cs.ICSBuyGoodReq} message CSBuyGoodReq message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSBuyGoodReq.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a CSBuyGoodReq message from the specified reader or buffer. * @function decode * @memberof cs.CSBuyGoodReq * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {cs.CSBuyGoodReq} CSBuyGoodReq * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSBuyGoodReq.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.cs.CSBuyGoodReq(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { message.goodId = reader.int32(); break; } case 2: { message.girlId = reader.int32(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a CSBuyGoodReq message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof cs.CSBuyGoodReq * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {cs.CSBuyGoodReq} CSBuyGoodReq * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSBuyGoodReq.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a CSBuyGoodReq message. * @function verify * @memberof cs.CSBuyGoodReq * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ CSBuyGoodReq.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.goodId != null && message.hasOwnProperty("goodId")) if (!$util.isInteger(message.goodId)) return "goodId: integer expected"; if (message.girlId != null && message.hasOwnProperty("girlId")) if (!$util.isInteger(message.girlId)) return "girlId: integer expected"; return null; }; /** * Creates a CSBuyGoodReq message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof cs.CSBuyGoodReq * @static * @param {Object.} object Plain object * @returns {cs.CSBuyGoodReq} CSBuyGoodReq */ CSBuyGoodReq.fromObject = function fromObject(object) { if (object instanceof $root.cs.CSBuyGoodReq) return object; var message = new $root.cs.CSBuyGoodReq(); if (object.goodId != null) message.goodId = object.goodId | 0; if (object.girlId != null) message.girlId = object.girlId | 0; return message; }; /** * Creates a plain object from a CSBuyGoodReq message. Also converts values to other types if specified. * @function toObject * @memberof cs.CSBuyGoodReq * @static * @param {cs.CSBuyGoodReq} message CSBuyGoodReq * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ CSBuyGoodReq.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.goodId = 0; object.girlId = 0; } if (message.goodId != null && message.hasOwnProperty("goodId")) object.goodId = message.goodId; if (message.girlId != null && message.hasOwnProperty("girlId")) object.girlId = message.girlId; return object; }; /** * Converts this CSBuyGoodReq to JSON. * @function toJSON * @memberof cs.CSBuyGoodReq * @instance * @returns {Object.} JSON object */ CSBuyGoodReq.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for CSBuyGoodReq * @function getTypeUrl * @memberof cs.CSBuyGoodReq * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ CSBuyGoodReq.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/cs.CSBuyGoodReq"; }; return CSBuyGoodReq; })(); cs.CSBuyGoodRes = (function() { /** * Properties of a CSBuyGoodRes. * @memberof cs * @interface ICSBuyGoodRes * @property {number|Long|null} [balance] CSBuyGoodRes balance * @property {number|Long|null} [vipExpire] CSBuyGoodRes vipExpire * @property {number|null} [chatRemainCount] CSBuyGoodRes chatRemainCount */ /** * Constructs a new CSBuyGoodRes. * @memberof cs * @classdesc Represents a CSBuyGoodRes. * @implements ICSBuyGoodRes * @constructor * @param {cs.ICSBuyGoodRes=} [properties] Properties to set */ function CSBuyGoodRes(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]]; } /** * CSBuyGoodRes balance. * @member {number|Long} balance * @memberof cs.CSBuyGoodRes * @instance */ CSBuyGoodRes.prototype.balance = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * CSBuyGoodRes vipExpire. * @member {number|Long} vipExpire * @memberof cs.CSBuyGoodRes * @instance */ CSBuyGoodRes.prototype.vipExpire = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * CSBuyGoodRes chatRemainCount. * @member {number} chatRemainCount * @memberof cs.CSBuyGoodRes * @instance */ CSBuyGoodRes.prototype.chatRemainCount = 0; /** * Creates a new CSBuyGoodRes instance using the specified properties. * @function create * @memberof cs.CSBuyGoodRes * @static * @param {cs.ICSBuyGoodRes=} [properties] Properties to set * @returns {cs.CSBuyGoodRes} CSBuyGoodRes instance */ CSBuyGoodRes.create = function create(properties) { return new CSBuyGoodRes(properties); }; /** * Encodes the specified CSBuyGoodRes message. Does not implicitly {@link cs.CSBuyGoodRes.verify|verify} messages. * @function encode * @memberof cs.CSBuyGoodRes * @static * @param {cs.ICSBuyGoodRes} message CSBuyGoodRes message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSBuyGoodRes.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.balance != null && Object.hasOwnProperty.call(message, "balance")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.balance); if (message.vipExpire != null && Object.hasOwnProperty.call(message, "vipExpire")) writer.uint32(/* id 2, wireType 0 =*/16).int64(message.vipExpire); if (message.chatRemainCount != null && Object.hasOwnProperty.call(message, "chatRemainCount")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.chatRemainCount); return writer; }; /** * Encodes the specified CSBuyGoodRes message, length delimited. Does not implicitly {@link cs.CSBuyGoodRes.verify|verify} messages. * @function encodeDelimited * @memberof cs.CSBuyGoodRes * @static * @param {cs.ICSBuyGoodRes} message CSBuyGoodRes message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSBuyGoodRes.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a CSBuyGoodRes message from the specified reader or buffer. * @function decode * @memberof cs.CSBuyGoodRes * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {cs.CSBuyGoodRes} CSBuyGoodRes * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSBuyGoodRes.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.cs.CSBuyGoodRes(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { message.balance = reader.int64(); break; } case 2: { message.vipExpire = reader.int64(); break; } case 3: { message.chatRemainCount = reader.int32(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a CSBuyGoodRes message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof cs.CSBuyGoodRes * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {cs.CSBuyGoodRes} CSBuyGoodRes * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSBuyGoodRes.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a CSBuyGoodRes message. * @function verify * @memberof cs.CSBuyGoodRes * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ CSBuyGoodRes.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.balance != null && message.hasOwnProperty("balance")) if (!$util.isInteger(message.balance) && !(message.balance && $util.isInteger(message.balance.low) && $util.isInteger(message.balance.high))) return "balance: integer|Long expected"; if (message.vipExpire != null && message.hasOwnProperty("vipExpire")) if (!$util.isInteger(message.vipExpire) && !(message.vipExpire && $util.isInteger(message.vipExpire.low) && $util.isInteger(message.vipExpire.high))) return "vipExpire: integer|Long expected"; if (message.chatRemainCount != null && message.hasOwnProperty("chatRemainCount")) if (!$util.isInteger(message.chatRemainCount)) return "chatRemainCount: integer expected"; return null; }; /** * Creates a CSBuyGoodRes message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof cs.CSBuyGoodRes * @static * @param {Object.} object Plain object * @returns {cs.CSBuyGoodRes} CSBuyGoodRes */ CSBuyGoodRes.fromObject = function fromObject(object) { if (object instanceof $root.cs.CSBuyGoodRes) return object; var message = new $root.cs.CSBuyGoodRes(); if (object.balance != null) if ($util.Long) (message.balance = $util.Long.fromValue(object.balance)).unsigned = false; else if (typeof object.balance === "string") message.balance = parseInt(object.balance, 10); else if (typeof object.balance === "number") message.balance = object.balance; else if (typeof object.balance === "object") message.balance = new $util.LongBits(object.balance.low >>> 0, object.balance.high >>> 0).toNumber(); if (object.vipExpire != null) if ($util.Long) (message.vipExpire = $util.Long.fromValue(object.vipExpire)).unsigned = false; else if (typeof object.vipExpire === "string") message.vipExpire = parseInt(object.vipExpire, 10); else if (typeof object.vipExpire === "number") message.vipExpire = object.vipExpire; else if (typeof object.vipExpire === "object") message.vipExpire = new $util.LongBits(object.vipExpire.low >>> 0, object.vipExpire.high >>> 0).toNumber(); if (object.chatRemainCount != null) message.chatRemainCount = object.chatRemainCount | 0; return message; }; /** * Creates a plain object from a CSBuyGoodRes message. Also converts values to other types if specified. * @function toObject * @memberof cs.CSBuyGoodRes * @static * @param {cs.CSBuyGoodRes} message CSBuyGoodRes * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ CSBuyGoodRes.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.balance = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.balance = options.longs === String ? "0" : 0; if ($util.Long) { var long = new $util.Long(0, 0, false); object.vipExpire = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.vipExpire = options.longs === String ? "0" : 0; object.chatRemainCount = 0; } if (message.balance != null && message.hasOwnProperty("balance")) if (typeof message.balance === "number") object.balance = options.longs === String ? String(message.balance) : message.balance; else object.balance = options.longs === String ? $util.Long.prototype.toString.call(message.balance) : options.longs === Number ? new $util.LongBits(message.balance.low >>> 0, message.balance.high >>> 0).toNumber() : message.balance; if (message.vipExpire != null && message.hasOwnProperty("vipExpire")) if (typeof message.vipExpire === "number") object.vipExpire = options.longs === String ? String(message.vipExpire) : message.vipExpire; else object.vipExpire = options.longs === String ? $util.Long.prototype.toString.call(message.vipExpire) : options.longs === Number ? new $util.LongBits(message.vipExpire.low >>> 0, message.vipExpire.high >>> 0).toNumber() : message.vipExpire; if (message.chatRemainCount != null && message.hasOwnProperty("chatRemainCount")) object.chatRemainCount = message.chatRemainCount; return object; }; /** * Converts this CSBuyGoodRes to JSON. * @function toJSON * @memberof cs.CSBuyGoodRes * @instance * @returns {Object.} JSON object */ CSBuyGoodRes.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for CSBuyGoodRes * @function getTypeUrl * @memberof cs.CSBuyGoodRes * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ CSBuyGoodRes.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/cs.CSBuyGoodRes"; }; return CSBuyGoodRes; })(); cs.CSCreateOrderReq = (function() { /** * Properties of a CSCreateOrderReq. * @memberof cs * @interface ICSCreateOrderReq * @property {number|null} [goodId] CSCreateOrderReq goodId */ /** * Constructs a new CSCreateOrderReq. * @memberof cs * @classdesc Represents a CSCreateOrderReq. * @implements ICSCreateOrderReq * @constructor * @param {cs.ICSCreateOrderReq=} [properties] Properties to set */ function CSCreateOrderReq(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]]; } /** * CSCreateOrderReq goodId. * @member {number} goodId * @memberof cs.CSCreateOrderReq * @instance */ CSCreateOrderReq.prototype.goodId = 0; /** * Creates a new CSCreateOrderReq instance using the specified properties. * @function create * @memberof cs.CSCreateOrderReq * @static * @param {cs.ICSCreateOrderReq=} [properties] Properties to set * @returns {cs.CSCreateOrderReq} CSCreateOrderReq instance */ CSCreateOrderReq.create = function create(properties) { return new CSCreateOrderReq(properties); }; /** * Encodes the specified CSCreateOrderReq message. Does not implicitly {@link cs.CSCreateOrderReq.verify|verify} messages. * @function encode * @memberof cs.CSCreateOrderReq * @static * @param {cs.ICSCreateOrderReq} message CSCreateOrderReq message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSCreateOrderReq.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.goodId != null && Object.hasOwnProperty.call(message, "goodId")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.goodId); return writer; }; /** * Encodes the specified CSCreateOrderReq message, length delimited. Does not implicitly {@link cs.CSCreateOrderReq.verify|verify} messages. * @function encodeDelimited * @memberof cs.CSCreateOrderReq * @static * @param {cs.ICSCreateOrderReq} message CSCreateOrderReq message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSCreateOrderReq.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a CSCreateOrderReq message from the specified reader or buffer. * @function decode * @memberof cs.CSCreateOrderReq * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {cs.CSCreateOrderReq} CSCreateOrderReq * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSCreateOrderReq.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.cs.CSCreateOrderReq(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { message.goodId = reader.int32(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a CSCreateOrderReq message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof cs.CSCreateOrderReq * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {cs.CSCreateOrderReq} CSCreateOrderReq * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSCreateOrderReq.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a CSCreateOrderReq message. * @function verify * @memberof cs.CSCreateOrderReq * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ CSCreateOrderReq.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.goodId != null && message.hasOwnProperty("goodId")) if (!$util.isInteger(message.goodId)) return "goodId: integer expected"; return null; }; /** * Creates a CSCreateOrderReq message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof cs.CSCreateOrderReq * @static * @param {Object.} object Plain object * @returns {cs.CSCreateOrderReq} CSCreateOrderReq */ CSCreateOrderReq.fromObject = function fromObject(object) { if (object instanceof $root.cs.CSCreateOrderReq) return object; var message = new $root.cs.CSCreateOrderReq(); if (object.goodId != null) message.goodId = object.goodId | 0; return message; }; /** * Creates a plain object from a CSCreateOrderReq message. Also converts values to other types if specified. * @function toObject * @memberof cs.CSCreateOrderReq * @static * @param {cs.CSCreateOrderReq} message CSCreateOrderReq * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ CSCreateOrderReq.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) object.goodId = 0; if (message.goodId != null && message.hasOwnProperty("goodId")) object.goodId = message.goodId; return object; }; /** * Converts this CSCreateOrderReq to JSON. * @function toJSON * @memberof cs.CSCreateOrderReq * @instance * @returns {Object.} JSON object */ CSCreateOrderReq.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for CSCreateOrderReq * @function getTypeUrl * @memberof cs.CSCreateOrderReq * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ CSCreateOrderReq.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/cs.CSCreateOrderReq"; }; return CSCreateOrderReq; })(); cs.CSCreateOrderRes = (function() { /** * Properties of a CSCreateOrderRes. * @memberof cs * @interface ICSCreateOrderRes * @property {string|null} [payUrl] CSCreateOrderRes payUrl * @property {string|null} [orderId] CSCreateOrderRes orderId */ /** * Constructs a new CSCreateOrderRes. * @memberof cs * @classdesc Represents a CSCreateOrderRes. * @implements ICSCreateOrderRes * @constructor * @param {cs.ICSCreateOrderRes=} [properties] Properties to set */ function CSCreateOrderRes(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]]; } /** * CSCreateOrderRes payUrl. * @member {string} payUrl * @memberof cs.CSCreateOrderRes * @instance */ CSCreateOrderRes.prototype.payUrl = ""; /** * CSCreateOrderRes orderId. * @member {string} orderId * @memberof cs.CSCreateOrderRes * @instance */ CSCreateOrderRes.prototype.orderId = ""; /** * Creates a new CSCreateOrderRes instance using the specified properties. * @function create * @memberof cs.CSCreateOrderRes * @static * @param {cs.ICSCreateOrderRes=} [properties] Properties to set * @returns {cs.CSCreateOrderRes} CSCreateOrderRes instance */ CSCreateOrderRes.create = function create(properties) { return new CSCreateOrderRes(properties); }; /** * Encodes the specified CSCreateOrderRes message. Does not implicitly {@link cs.CSCreateOrderRes.verify|verify} messages. * @function encode * @memberof cs.CSCreateOrderRes * @static * @param {cs.ICSCreateOrderRes} message CSCreateOrderRes message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSCreateOrderRes.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.payUrl != null && Object.hasOwnProperty.call(message, "payUrl")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.payUrl); if (message.orderId != null && Object.hasOwnProperty.call(message, "orderId")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.orderId); return writer; }; /** * Encodes the specified CSCreateOrderRes message, length delimited. Does not implicitly {@link cs.CSCreateOrderRes.verify|verify} messages. * @function encodeDelimited * @memberof cs.CSCreateOrderRes * @static * @param {cs.ICSCreateOrderRes} message CSCreateOrderRes message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSCreateOrderRes.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a CSCreateOrderRes message from the specified reader or buffer. * @function decode * @memberof cs.CSCreateOrderRes * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {cs.CSCreateOrderRes} CSCreateOrderRes * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSCreateOrderRes.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.cs.CSCreateOrderRes(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { message.payUrl = reader.string(); break; } case 2: { message.orderId = reader.string(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a CSCreateOrderRes message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof cs.CSCreateOrderRes * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {cs.CSCreateOrderRes} CSCreateOrderRes * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSCreateOrderRes.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a CSCreateOrderRes message. * @function verify * @memberof cs.CSCreateOrderRes * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ CSCreateOrderRes.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.payUrl != null && message.hasOwnProperty("payUrl")) if (!$util.isString(message.payUrl)) return "payUrl: string expected"; if (message.orderId != null && message.hasOwnProperty("orderId")) if (!$util.isString(message.orderId)) return "orderId: string expected"; return null; }; /** * Creates a CSCreateOrderRes message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof cs.CSCreateOrderRes * @static * @param {Object.} object Plain object * @returns {cs.CSCreateOrderRes} CSCreateOrderRes */ CSCreateOrderRes.fromObject = function fromObject(object) { if (object instanceof $root.cs.CSCreateOrderRes) return object; var message = new $root.cs.CSCreateOrderRes(); if (object.payUrl != null) message.payUrl = String(object.payUrl); if (object.orderId != null) message.orderId = String(object.orderId); return message; }; /** * Creates a plain object from a CSCreateOrderRes message. Also converts values to other types if specified. * @function toObject * @memberof cs.CSCreateOrderRes * @static * @param {cs.CSCreateOrderRes} message CSCreateOrderRes * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ CSCreateOrderRes.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.payUrl = ""; object.orderId = ""; } if (message.payUrl != null && message.hasOwnProperty("payUrl")) object.payUrl = message.payUrl; if (message.orderId != null && message.hasOwnProperty("orderId")) object.orderId = message.orderId; return object; }; /** * Converts this CSCreateOrderRes to JSON. * @function toJSON * @memberof cs.CSCreateOrderRes * @instance * @returns {Object.} JSON object */ CSCreateOrderRes.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for CSCreateOrderRes * @function getTypeUrl * @memberof cs.CSCreateOrderRes * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ CSCreateOrderRes.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/cs.CSCreateOrderRes"; }; return CSCreateOrderRes; })(); cs.CSQueryOrderReq = (function() { /** * Properties of a CSQueryOrderReq. * @memberof cs * @interface ICSQueryOrderReq * @property {string|null} [orderId] CSQueryOrderReq orderId */ /** * Constructs a new CSQueryOrderReq. * @memberof cs * @classdesc Represents a CSQueryOrderReq. * @implements ICSQueryOrderReq * @constructor * @param {cs.ICSQueryOrderReq=} [properties] Properties to set */ function CSQueryOrderReq(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]]; } /** * CSQueryOrderReq orderId. * @member {string} orderId * @memberof cs.CSQueryOrderReq * @instance */ CSQueryOrderReq.prototype.orderId = ""; /** * Creates a new CSQueryOrderReq instance using the specified properties. * @function create * @memberof cs.CSQueryOrderReq * @static * @param {cs.ICSQueryOrderReq=} [properties] Properties to set * @returns {cs.CSQueryOrderReq} CSQueryOrderReq instance */ CSQueryOrderReq.create = function create(properties) { return new CSQueryOrderReq(properties); }; /** * Encodes the specified CSQueryOrderReq message. Does not implicitly {@link cs.CSQueryOrderReq.verify|verify} messages. * @function encode * @memberof cs.CSQueryOrderReq * @static * @param {cs.ICSQueryOrderReq} message CSQueryOrderReq message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSQueryOrderReq.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.orderId != null && Object.hasOwnProperty.call(message, "orderId")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.orderId); return writer; }; /** * Encodes the specified CSQueryOrderReq message, length delimited. Does not implicitly {@link cs.CSQueryOrderReq.verify|verify} messages. * @function encodeDelimited * @memberof cs.CSQueryOrderReq * @static * @param {cs.ICSQueryOrderReq} message CSQueryOrderReq message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSQueryOrderReq.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a CSQueryOrderReq message from the specified reader or buffer. * @function decode * @memberof cs.CSQueryOrderReq * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {cs.CSQueryOrderReq} CSQueryOrderReq * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSQueryOrderReq.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.cs.CSQueryOrderReq(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { message.orderId = reader.string(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a CSQueryOrderReq message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof cs.CSQueryOrderReq * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {cs.CSQueryOrderReq} CSQueryOrderReq * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSQueryOrderReq.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a CSQueryOrderReq message. * @function verify * @memberof cs.CSQueryOrderReq * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ CSQueryOrderReq.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.orderId != null && message.hasOwnProperty("orderId")) if (!$util.isString(message.orderId)) return "orderId: string expected"; return null; }; /** * Creates a CSQueryOrderReq message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof cs.CSQueryOrderReq * @static * @param {Object.} object Plain object * @returns {cs.CSQueryOrderReq} CSQueryOrderReq */ CSQueryOrderReq.fromObject = function fromObject(object) { if (object instanceof $root.cs.CSQueryOrderReq) return object; var message = new $root.cs.CSQueryOrderReq(); if (object.orderId != null) message.orderId = String(object.orderId); return message; }; /** * Creates a plain object from a CSQueryOrderReq message. Also converts values to other types if specified. * @function toObject * @memberof cs.CSQueryOrderReq * @static * @param {cs.CSQueryOrderReq} message CSQueryOrderReq * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ CSQueryOrderReq.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) object.orderId = ""; if (message.orderId != null && message.hasOwnProperty("orderId")) object.orderId = message.orderId; return object; }; /** * Converts this CSQueryOrderReq to JSON. * @function toJSON * @memberof cs.CSQueryOrderReq * @instance * @returns {Object.} JSON object */ CSQueryOrderReq.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for CSQueryOrderReq * @function getTypeUrl * @memberof cs.CSQueryOrderReq * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ CSQueryOrderReq.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/cs.CSQueryOrderReq"; }; return CSQueryOrderReq; })(); cs.CSQueryOrderRes = (function() { /** * Properties of a CSQueryOrderRes. * @memberof cs * @interface ICSQueryOrderRes * @property {number|null} [status] CSQueryOrderRes status * @property {number|null} [retCode] CSQueryOrderRes retCode * @property {number|Long|null} [balance] CSQueryOrderRes balance * @property {number|Long|null} [vipExpire] CSQueryOrderRes vipExpire */ /** * Constructs a new CSQueryOrderRes. * @memberof cs * @classdesc Represents a CSQueryOrderRes. * @implements ICSQueryOrderRes * @constructor * @param {cs.ICSQueryOrderRes=} [properties] Properties to set */ function CSQueryOrderRes(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]]; } /** * CSQueryOrderRes status. * @member {number} status * @memberof cs.CSQueryOrderRes * @instance */ CSQueryOrderRes.prototype.status = 0; /** * CSQueryOrderRes retCode. * @member {number} retCode * @memberof cs.CSQueryOrderRes * @instance */ CSQueryOrderRes.prototype.retCode = 0; /** * CSQueryOrderRes balance. * @member {number|Long} balance * @memberof cs.CSQueryOrderRes * @instance */ CSQueryOrderRes.prototype.balance = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * CSQueryOrderRes vipExpire. * @member {number|Long} vipExpire * @memberof cs.CSQueryOrderRes * @instance */ CSQueryOrderRes.prototype.vipExpire = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new CSQueryOrderRes instance using the specified properties. * @function create * @memberof cs.CSQueryOrderRes * @static * @param {cs.ICSQueryOrderRes=} [properties] Properties to set * @returns {cs.CSQueryOrderRes} CSQueryOrderRes instance */ CSQueryOrderRes.create = function create(properties) { return new CSQueryOrderRes(properties); }; /** * Encodes the specified CSQueryOrderRes message. Does not implicitly {@link cs.CSQueryOrderRes.verify|verify} messages. * @function encode * @memberof cs.CSQueryOrderRes * @static * @param {cs.ICSQueryOrderRes} message CSQueryOrderRes message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSQueryOrderRes.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.status != null && Object.hasOwnProperty.call(message, "status")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.status); if (message.retCode != null && Object.hasOwnProperty.call(message, "retCode")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.retCode); if (message.balance != null && Object.hasOwnProperty.call(message, "balance")) writer.uint32(/* id 3, wireType 0 =*/24).int64(message.balance); if (message.vipExpire != null && Object.hasOwnProperty.call(message, "vipExpire")) writer.uint32(/* id 4, wireType 0 =*/32).int64(message.vipExpire); return writer; }; /** * Encodes the specified CSQueryOrderRes message, length delimited. Does not implicitly {@link cs.CSQueryOrderRes.verify|verify} messages. * @function encodeDelimited * @memberof cs.CSQueryOrderRes * @static * @param {cs.ICSQueryOrderRes} message CSQueryOrderRes message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSQueryOrderRes.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a CSQueryOrderRes message from the specified reader or buffer. * @function decode * @memberof cs.CSQueryOrderRes * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {cs.CSQueryOrderRes} CSQueryOrderRes * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSQueryOrderRes.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.cs.CSQueryOrderRes(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { message.status = reader.int32(); break; } case 2: { message.retCode = reader.int32(); break; } case 3: { message.balance = reader.int64(); break; } case 4: { message.vipExpire = reader.int64(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a CSQueryOrderRes message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof cs.CSQueryOrderRes * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {cs.CSQueryOrderRes} CSQueryOrderRes * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSQueryOrderRes.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a CSQueryOrderRes message. * @function verify * @memberof cs.CSQueryOrderRes * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ CSQueryOrderRes.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.status != null && message.hasOwnProperty("status")) if (!$util.isInteger(message.status)) return "status: integer expected"; if (message.retCode != null && message.hasOwnProperty("retCode")) if (!$util.isInteger(message.retCode)) return "retCode: integer expected"; if (message.balance != null && message.hasOwnProperty("balance")) if (!$util.isInteger(message.balance) && !(message.balance && $util.isInteger(message.balance.low) && $util.isInteger(message.balance.high))) return "balance: integer|Long expected"; if (message.vipExpire != null && message.hasOwnProperty("vipExpire")) if (!$util.isInteger(message.vipExpire) && !(message.vipExpire && $util.isInteger(message.vipExpire.low) && $util.isInteger(message.vipExpire.high))) return "vipExpire: integer|Long expected"; return null; }; /** * Creates a CSQueryOrderRes message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof cs.CSQueryOrderRes * @static * @param {Object.} object Plain object * @returns {cs.CSQueryOrderRes} CSQueryOrderRes */ CSQueryOrderRes.fromObject = function fromObject(object) { if (object instanceof $root.cs.CSQueryOrderRes) return object; var message = new $root.cs.CSQueryOrderRes(); if (object.status != null) message.status = object.status | 0; if (object.retCode != null) message.retCode = object.retCode | 0; if (object.balance != null) if ($util.Long) (message.balance = $util.Long.fromValue(object.balance)).unsigned = false; else if (typeof object.balance === "string") message.balance = parseInt(object.balance, 10); else if (typeof object.balance === "number") message.balance = object.balance; else if (typeof object.balance === "object") message.balance = new $util.LongBits(object.balance.low >>> 0, object.balance.high >>> 0).toNumber(); if (object.vipExpire != null) if ($util.Long) (message.vipExpire = $util.Long.fromValue(object.vipExpire)).unsigned = false; else if (typeof object.vipExpire === "string") message.vipExpire = parseInt(object.vipExpire, 10); else if (typeof object.vipExpire === "number") message.vipExpire = object.vipExpire; else if (typeof object.vipExpire === "object") message.vipExpire = new $util.LongBits(object.vipExpire.low >>> 0, object.vipExpire.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from a CSQueryOrderRes message. Also converts values to other types if specified. * @function toObject * @memberof cs.CSQueryOrderRes * @static * @param {cs.CSQueryOrderRes} message CSQueryOrderRes * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ CSQueryOrderRes.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.status = 0; object.retCode = 0; if ($util.Long) { var long = new $util.Long(0, 0, false); object.balance = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.balance = options.longs === String ? "0" : 0; if ($util.Long) { var long = new $util.Long(0, 0, false); object.vipExpire = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.vipExpire = options.longs === String ? "0" : 0; } if (message.status != null && message.hasOwnProperty("status")) object.status = message.status; if (message.retCode != null && message.hasOwnProperty("retCode")) object.retCode = message.retCode; if (message.balance != null && message.hasOwnProperty("balance")) if (typeof message.balance === "number") object.balance = options.longs === String ? String(message.balance) : message.balance; else object.balance = options.longs === String ? $util.Long.prototype.toString.call(message.balance) : options.longs === Number ? new $util.LongBits(message.balance.low >>> 0, message.balance.high >>> 0).toNumber() : message.balance; if (message.vipExpire != null && message.hasOwnProperty("vipExpire")) if (typeof message.vipExpire === "number") object.vipExpire = options.longs === String ? String(message.vipExpire) : message.vipExpire; else object.vipExpire = options.longs === String ? $util.Long.prototype.toString.call(message.vipExpire) : options.longs === Number ? new $util.LongBits(message.vipExpire.low >>> 0, message.vipExpire.high >>> 0).toNumber() : message.vipExpire; return object; }; /** * Converts this CSQueryOrderRes to JSON. * @function toJSON * @memberof cs.CSQueryOrderRes * @instance * @returns {Object.} JSON object */ CSQueryOrderRes.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for CSQueryOrderRes * @function getTypeUrl * @memberof cs.CSQueryOrderRes * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ CSQueryOrderRes.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/cs.CSQueryOrderRes"; }; return CSQueryOrderRes; })(); cs.ChatMsg = (function() { /** * Properties of a ChatMsg. * @memberof cs * @interface IChatMsg * @property {string|null} [msg] ChatMsg msg * @property {boolean|null} [isAi] ChatMsg isAi * @property {string|null} [msgId] ChatMsg msgId */ /** * Constructs a new ChatMsg. * @memberof cs * @classdesc Represents a ChatMsg. * @implements IChatMsg * @constructor * @param {cs.IChatMsg=} [properties] Properties to set */ function ChatMsg(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]]; } /** * ChatMsg msg. * @member {string} msg * @memberof cs.ChatMsg * @instance */ ChatMsg.prototype.msg = ""; /** * ChatMsg isAi. * @member {boolean} isAi * @memberof cs.ChatMsg * @instance */ ChatMsg.prototype.isAi = false; /** * ChatMsg msgId. * @member {string} msgId * @memberof cs.ChatMsg * @instance */ ChatMsg.prototype.msgId = ""; /** * Creates a new ChatMsg instance using the specified properties. * @function create * @memberof cs.ChatMsg * @static * @param {cs.IChatMsg=} [properties] Properties to set * @returns {cs.ChatMsg} ChatMsg instance */ ChatMsg.create = function create(properties) { return new ChatMsg(properties); }; /** * Encodes the specified ChatMsg message. Does not implicitly {@link cs.ChatMsg.verify|verify} messages. * @function encode * @memberof cs.ChatMsg * @static * @param {cs.IChatMsg} message ChatMsg message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ ChatMsg.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.msg != null && Object.hasOwnProperty.call(message, "msg")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.msg); if (message.isAi != null && Object.hasOwnProperty.call(message, "isAi")) writer.uint32(/* id 2, wireType 0 =*/16).bool(message.isAi); if (message.msgId != null && Object.hasOwnProperty.call(message, "msgId")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.msgId); return writer; }; /** * Encodes the specified ChatMsg message, length delimited. Does not implicitly {@link cs.ChatMsg.verify|verify} messages. * @function encodeDelimited * @memberof cs.ChatMsg * @static * @param {cs.IChatMsg} message ChatMsg message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ ChatMsg.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a ChatMsg message from the specified reader or buffer. * @function decode * @memberof cs.ChatMsg * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {cs.ChatMsg} ChatMsg * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ ChatMsg.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.cs.ChatMsg(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { message.msg = reader.string(); break; } case 2: { message.isAi = reader.bool(); break; } case 3: { message.msgId = reader.string(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a ChatMsg message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof cs.ChatMsg * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {cs.ChatMsg} ChatMsg * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ ChatMsg.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a ChatMsg message. * @function verify * @memberof cs.ChatMsg * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ ChatMsg.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.msg != null && message.hasOwnProperty("msg")) if (!$util.isString(message.msg)) return "msg: string expected"; if (message.isAi != null && message.hasOwnProperty("isAi")) if (typeof message.isAi !== "boolean") return "isAi: boolean expected"; if (message.msgId != null && message.hasOwnProperty("msgId")) if (!$util.isString(message.msgId)) return "msgId: string expected"; return null; }; /** * Creates a ChatMsg message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof cs.ChatMsg * @static * @param {Object.} object Plain object * @returns {cs.ChatMsg} ChatMsg */ ChatMsg.fromObject = function fromObject(object) { if (object instanceof $root.cs.ChatMsg) return object; var message = new $root.cs.ChatMsg(); if (object.msg != null) message.msg = String(object.msg); if (object.isAi != null) message.isAi = Boolean(object.isAi); if (object.msgId != null) message.msgId = String(object.msgId); return message; }; /** * Creates a plain object from a ChatMsg message. Also converts values to other types if specified. * @function toObject * @memberof cs.ChatMsg * @static * @param {cs.ChatMsg} message ChatMsg * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ ChatMsg.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.msg = ""; object.isAi = false; object.msgId = ""; } if (message.msg != null && message.hasOwnProperty("msg")) object.msg = message.msg; if (message.isAi != null && message.hasOwnProperty("isAi")) object.isAi = message.isAi; if (message.msgId != null && message.hasOwnProperty("msgId")) object.msgId = message.msgId; return object; }; /** * Converts this ChatMsg to JSON. * @function toJSON * @memberof cs.ChatMsg * @instance * @returns {Object.} JSON object */ ChatMsg.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for ChatMsg * @function getTypeUrl * @memberof cs.ChatMsg * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ ChatMsg.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/cs.ChatMsg"; }; return ChatMsg; })(); cs.CSChatMsgReq = (function() { /** * Properties of a CSChatMsgReq. * @memberof cs * @interface ICSChatMsgReq * @property {number|null} [girlId] CSChatMsgReq girlId * @property {Array.|null} [msgs] CSChatMsgReq msgs */ /** * Constructs a new CSChatMsgReq. * @memberof cs * @classdesc Represents a CSChatMsgReq. * @implements ICSChatMsgReq * @constructor * @param {cs.ICSChatMsgReq=} [properties] Properties to set */ function CSChatMsgReq(properties) { this.msgs = []; 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]]; } /** * CSChatMsgReq girlId. * @member {number} girlId * @memberof cs.CSChatMsgReq * @instance */ CSChatMsgReq.prototype.girlId = 0; /** * CSChatMsgReq msgs. * @member {Array.} msgs * @memberof cs.CSChatMsgReq * @instance */ CSChatMsgReq.prototype.msgs = $util.emptyArray; /** * Creates a new CSChatMsgReq instance using the specified properties. * @function create * @memberof cs.CSChatMsgReq * @static * @param {cs.ICSChatMsgReq=} [properties] Properties to set * @returns {cs.CSChatMsgReq} CSChatMsgReq instance */ CSChatMsgReq.create = function create(properties) { return new CSChatMsgReq(properties); }; /** * Encodes the specified CSChatMsgReq message. Does not implicitly {@link cs.CSChatMsgReq.verify|verify} messages. * @function encode * @memberof cs.CSChatMsgReq * @static * @param {cs.ICSChatMsgReq} message CSChatMsgReq message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSChatMsgReq.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.girlId != null && Object.hasOwnProperty.call(message, "girlId")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.girlId); if (message.msgs != null && message.msgs.length) for (var i = 0; i < message.msgs.length; ++i) $root.cs.ChatMsg.encode(message.msgs[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** * Encodes the specified CSChatMsgReq message, length delimited. Does not implicitly {@link cs.CSChatMsgReq.verify|verify} messages. * @function encodeDelimited * @memberof cs.CSChatMsgReq * @static * @param {cs.ICSChatMsgReq} message CSChatMsgReq message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSChatMsgReq.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a CSChatMsgReq message from the specified reader or buffer. * @function decode * @memberof cs.CSChatMsgReq * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {cs.CSChatMsgReq} CSChatMsgReq * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSChatMsgReq.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.cs.CSChatMsgReq(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { message.girlId = reader.int32(); break; } case 2: { if (!(message.msgs && message.msgs.length)) message.msgs = []; message.msgs.push($root.cs.ChatMsg.decode(reader, reader.uint32())); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a CSChatMsgReq message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof cs.CSChatMsgReq * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {cs.CSChatMsgReq} CSChatMsgReq * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSChatMsgReq.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a CSChatMsgReq message. * @function verify * @memberof cs.CSChatMsgReq * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ CSChatMsgReq.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.girlId != null && message.hasOwnProperty("girlId")) if (!$util.isInteger(message.girlId)) return "girlId: integer expected"; if (message.msgs != null && message.hasOwnProperty("msgs")) { if (!Array.isArray(message.msgs)) return "msgs: array expected"; for (var i = 0; i < message.msgs.length; ++i) { var error = $root.cs.ChatMsg.verify(message.msgs[i]); if (error) return "msgs." + error; } } return null; }; /** * Creates a CSChatMsgReq message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof cs.CSChatMsgReq * @static * @param {Object.} object Plain object * @returns {cs.CSChatMsgReq} CSChatMsgReq */ CSChatMsgReq.fromObject = function fromObject(object) { if (object instanceof $root.cs.CSChatMsgReq) return object; var message = new $root.cs.CSChatMsgReq(); if (object.girlId != null) message.girlId = object.girlId | 0; if (object.msgs) { if (!Array.isArray(object.msgs)) throw TypeError(".cs.CSChatMsgReq.msgs: array expected"); message.msgs = []; for (var i = 0; i < object.msgs.length; ++i) { if (typeof object.msgs[i] !== "object") throw TypeError(".cs.CSChatMsgReq.msgs: object expected"); message.msgs[i] = $root.cs.ChatMsg.fromObject(object.msgs[i]); } } return message; }; /** * Creates a plain object from a CSChatMsgReq message. Also converts values to other types if specified. * @function toObject * @memberof cs.CSChatMsgReq * @static * @param {cs.CSChatMsgReq} message CSChatMsgReq * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ CSChatMsgReq.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) object.msgs = []; if (options.defaults) object.girlId = 0; if (message.girlId != null && message.hasOwnProperty("girlId")) object.girlId = message.girlId; if (message.msgs && message.msgs.length) { object.msgs = []; for (var j = 0; j < message.msgs.length; ++j) object.msgs[j] = $root.cs.ChatMsg.toObject(message.msgs[j], options); } return object; }; /** * Converts this CSChatMsgReq to JSON. * @function toJSON * @memberof cs.CSChatMsgReq * @instance * @returns {Object.} JSON object */ CSChatMsgReq.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for CSChatMsgReq * @function getTypeUrl * @memberof cs.CSChatMsgReq * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ CSChatMsgReq.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/cs.CSChatMsgReq"; }; return CSChatMsgReq; })(); cs.CSChatMsgRes = (function() { /** * Properties of a CSChatMsgRes. * @memberof cs * @interface ICSChatMsgRes * @property {number|null} [chatRemainCount] CSChatMsgRes chatRemainCount * @property {number|null} [chatTotalCount] CSChatMsgRes chatTotalCount */ /** * Constructs a new CSChatMsgRes. * @memberof cs * @classdesc Represents a CSChatMsgRes. * @implements ICSChatMsgRes * @constructor * @param {cs.ICSChatMsgRes=} [properties] Properties to set */ function CSChatMsgRes(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]]; } /** * CSChatMsgRes chatRemainCount. * @member {number} chatRemainCount * @memberof cs.CSChatMsgRes * @instance */ CSChatMsgRes.prototype.chatRemainCount = 0; /** * CSChatMsgRes chatTotalCount. * @member {number} chatTotalCount * @memberof cs.CSChatMsgRes * @instance */ CSChatMsgRes.prototype.chatTotalCount = 0; /** * Creates a new CSChatMsgRes instance using the specified properties. * @function create * @memberof cs.CSChatMsgRes * @static * @param {cs.ICSChatMsgRes=} [properties] Properties to set * @returns {cs.CSChatMsgRes} CSChatMsgRes instance */ CSChatMsgRes.create = function create(properties) { return new CSChatMsgRes(properties); }; /** * Encodes the specified CSChatMsgRes message. Does not implicitly {@link cs.CSChatMsgRes.verify|verify} messages. * @function encode * @memberof cs.CSChatMsgRes * @static * @param {cs.ICSChatMsgRes} message CSChatMsgRes message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSChatMsgRes.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.chatRemainCount != null && Object.hasOwnProperty.call(message, "chatRemainCount")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.chatRemainCount); if (message.chatTotalCount != null && Object.hasOwnProperty.call(message, "chatTotalCount")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.chatTotalCount); return writer; }; /** * Encodes the specified CSChatMsgRes message, length delimited. Does not implicitly {@link cs.CSChatMsgRes.verify|verify} messages. * @function encodeDelimited * @memberof cs.CSChatMsgRes * @static * @param {cs.ICSChatMsgRes} message CSChatMsgRes message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSChatMsgRes.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a CSChatMsgRes message from the specified reader or buffer. * @function decode * @memberof cs.CSChatMsgRes * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {cs.CSChatMsgRes} CSChatMsgRes * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSChatMsgRes.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.cs.CSChatMsgRes(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { message.chatRemainCount = reader.int32(); break; } case 2: { message.chatTotalCount = reader.int32(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a CSChatMsgRes message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof cs.CSChatMsgRes * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {cs.CSChatMsgRes} CSChatMsgRes * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSChatMsgRes.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a CSChatMsgRes message. * @function verify * @memberof cs.CSChatMsgRes * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ CSChatMsgRes.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.chatRemainCount != null && message.hasOwnProperty("chatRemainCount")) if (!$util.isInteger(message.chatRemainCount)) return "chatRemainCount: integer expected"; if (message.chatTotalCount != null && message.hasOwnProperty("chatTotalCount")) if (!$util.isInteger(message.chatTotalCount)) return "chatTotalCount: integer expected"; return null; }; /** * Creates a CSChatMsgRes message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof cs.CSChatMsgRes * @static * @param {Object.} object Plain object * @returns {cs.CSChatMsgRes} CSChatMsgRes */ CSChatMsgRes.fromObject = function fromObject(object) { if (object instanceof $root.cs.CSChatMsgRes) return object; var message = new $root.cs.CSChatMsgRes(); if (object.chatRemainCount != null) message.chatRemainCount = object.chatRemainCount | 0; if (object.chatTotalCount != null) message.chatTotalCount = object.chatTotalCount | 0; return message; }; /** * Creates a plain object from a CSChatMsgRes message. Also converts values to other types if specified. * @function toObject * @memberof cs.CSChatMsgRes * @static * @param {cs.CSChatMsgRes} message CSChatMsgRes * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ CSChatMsgRes.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.chatRemainCount = 0; object.chatTotalCount = 0; } if (message.chatRemainCount != null && message.hasOwnProperty("chatRemainCount")) object.chatRemainCount = message.chatRemainCount; if (message.chatTotalCount != null && message.hasOwnProperty("chatTotalCount")) object.chatTotalCount = message.chatTotalCount; return object; }; /** * Converts this CSChatMsgRes to JSON. * @function toJSON * @memberof cs.CSChatMsgRes * @instance * @returns {Object.} JSON object */ CSChatMsgRes.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for CSChatMsgRes * @function getTypeUrl * @memberof cs.CSChatMsgRes * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ CSChatMsgRes.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/cs.CSChatMsgRes"; }; return CSChatMsgRes; })(); cs.CSGetChatMsgReq = (function() { /** * Properties of a CSGetChatMsgReq. * @memberof cs * @interface ICSGetChatMsgReq * @property {number|null} [page] CSGetChatMsgReq page * @property {number|null} [limit] CSGetChatMsgReq limit * @property {number|null} [GirlId] CSGetChatMsgReq GirlId */ /** * Constructs a new CSGetChatMsgReq. * @memberof cs * @classdesc Represents a CSGetChatMsgReq. * @implements ICSGetChatMsgReq * @constructor * @param {cs.ICSGetChatMsgReq=} [properties] Properties to set */ function CSGetChatMsgReq(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]]; } /** * CSGetChatMsgReq page. * @member {number} page * @memberof cs.CSGetChatMsgReq * @instance */ CSGetChatMsgReq.prototype.page = 0; /** * CSGetChatMsgReq limit. * @member {number} limit * @memberof cs.CSGetChatMsgReq * @instance */ CSGetChatMsgReq.prototype.limit = 0; /** * CSGetChatMsgReq GirlId. * @member {number} GirlId * @memberof cs.CSGetChatMsgReq * @instance */ CSGetChatMsgReq.prototype.GirlId = 0; /** * Creates a new CSGetChatMsgReq instance using the specified properties. * @function create * @memberof cs.CSGetChatMsgReq * @static * @param {cs.ICSGetChatMsgReq=} [properties] Properties to set * @returns {cs.CSGetChatMsgReq} CSGetChatMsgReq instance */ CSGetChatMsgReq.create = function create(properties) { return new CSGetChatMsgReq(properties); }; /** * Encodes the specified CSGetChatMsgReq message. Does not implicitly {@link cs.CSGetChatMsgReq.verify|verify} messages. * @function encode * @memberof cs.CSGetChatMsgReq * @static * @param {cs.ICSGetChatMsgReq} message CSGetChatMsgReq message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSGetChatMsgReq.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.page != null && Object.hasOwnProperty.call(message, "page")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.page); if (message.limit != null && Object.hasOwnProperty.call(message, "limit")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.limit); if (message.GirlId != null && Object.hasOwnProperty.call(message, "GirlId")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.GirlId); return writer; }; /** * Encodes the specified CSGetChatMsgReq message, length delimited. Does not implicitly {@link cs.CSGetChatMsgReq.verify|verify} messages. * @function encodeDelimited * @memberof cs.CSGetChatMsgReq * @static * @param {cs.ICSGetChatMsgReq} message CSGetChatMsgReq message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSGetChatMsgReq.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a CSGetChatMsgReq message from the specified reader or buffer. * @function decode * @memberof cs.CSGetChatMsgReq * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {cs.CSGetChatMsgReq} CSGetChatMsgReq * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSGetChatMsgReq.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.cs.CSGetChatMsgReq(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { message.page = reader.int32(); break; } case 2: { message.limit = reader.int32(); break; } case 3: { message.GirlId = reader.int32(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a CSGetChatMsgReq message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof cs.CSGetChatMsgReq * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {cs.CSGetChatMsgReq} CSGetChatMsgReq * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSGetChatMsgReq.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a CSGetChatMsgReq message. * @function verify * @memberof cs.CSGetChatMsgReq * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ CSGetChatMsgReq.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.page != null && message.hasOwnProperty("page")) if (!$util.isInteger(message.page)) return "page: integer expected"; if (message.limit != null && message.hasOwnProperty("limit")) if (!$util.isInteger(message.limit)) return "limit: integer expected"; if (message.GirlId != null && message.hasOwnProperty("GirlId")) if (!$util.isInteger(message.GirlId)) return "GirlId: integer expected"; return null; }; /** * Creates a CSGetChatMsgReq message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof cs.CSGetChatMsgReq * @static * @param {Object.} object Plain object * @returns {cs.CSGetChatMsgReq} CSGetChatMsgReq */ CSGetChatMsgReq.fromObject = function fromObject(object) { if (object instanceof $root.cs.CSGetChatMsgReq) return object; var message = new $root.cs.CSGetChatMsgReq(); if (object.page != null) message.page = object.page | 0; if (object.limit != null) message.limit = object.limit | 0; if (object.GirlId != null) message.GirlId = object.GirlId | 0; return message; }; /** * Creates a plain object from a CSGetChatMsgReq message. Also converts values to other types if specified. * @function toObject * @memberof cs.CSGetChatMsgReq * @static * @param {cs.CSGetChatMsgReq} message CSGetChatMsgReq * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ CSGetChatMsgReq.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.page = 0; object.limit = 0; object.GirlId = 0; } if (message.page != null && message.hasOwnProperty("page")) object.page = message.page; if (message.limit != null && message.hasOwnProperty("limit")) object.limit = message.limit; if (message.GirlId != null && message.hasOwnProperty("GirlId")) object.GirlId = message.GirlId; return object; }; /** * Converts this CSGetChatMsgReq to JSON. * @function toJSON * @memberof cs.CSGetChatMsgReq * @instance * @returns {Object.} JSON object */ CSGetChatMsgReq.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for CSGetChatMsgReq * @function getTypeUrl * @memberof cs.CSGetChatMsgReq * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ CSGetChatMsgReq.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/cs.CSGetChatMsgReq"; }; return CSGetChatMsgReq; })(); cs.CSGetChatMsgRes = (function() { /** * Properties of a CSGetChatMsgRes. * @memberof cs * @interface ICSGetChatMsgRes * @property {Array.|null} [msgs] CSGetChatMsgRes msgs * @property {number|null} [chatRemainCount] CSGetChatMsgRes chatRemainCount * @property {number|null} [chatTotalCount] CSGetChatMsgRes chatTotalCount */ /** * Constructs a new CSGetChatMsgRes. * @memberof cs * @classdesc Represents a CSGetChatMsgRes. * @implements ICSGetChatMsgRes * @constructor * @param {cs.ICSGetChatMsgRes=} [properties] Properties to set */ function CSGetChatMsgRes(properties) { this.msgs = []; 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]]; } /** * CSGetChatMsgRes msgs. * @member {Array.} msgs * @memberof cs.CSGetChatMsgRes * @instance */ CSGetChatMsgRes.prototype.msgs = $util.emptyArray; /** * CSGetChatMsgRes chatRemainCount. * @member {number} chatRemainCount * @memberof cs.CSGetChatMsgRes * @instance */ CSGetChatMsgRes.prototype.chatRemainCount = 0; /** * CSGetChatMsgRes chatTotalCount. * @member {number} chatTotalCount * @memberof cs.CSGetChatMsgRes * @instance */ CSGetChatMsgRes.prototype.chatTotalCount = 0; /** * Creates a new CSGetChatMsgRes instance using the specified properties. * @function create * @memberof cs.CSGetChatMsgRes * @static * @param {cs.ICSGetChatMsgRes=} [properties] Properties to set * @returns {cs.CSGetChatMsgRes} CSGetChatMsgRes instance */ CSGetChatMsgRes.create = function create(properties) { return new CSGetChatMsgRes(properties); }; /** * Encodes the specified CSGetChatMsgRes message. Does not implicitly {@link cs.CSGetChatMsgRes.verify|verify} messages. * @function encode * @memberof cs.CSGetChatMsgRes * @static * @param {cs.ICSGetChatMsgRes} message CSGetChatMsgRes message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSGetChatMsgRes.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.msgs != null && message.msgs.length) for (var i = 0; i < message.msgs.length; ++i) $root.cs.ChatMsg.encode(message.msgs[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.chatRemainCount != null && Object.hasOwnProperty.call(message, "chatRemainCount")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.chatRemainCount); if (message.chatTotalCount != null && Object.hasOwnProperty.call(message, "chatTotalCount")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.chatTotalCount); return writer; }; /** * Encodes the specified CSGetChatMsgRes message, length delimited. Does not implicitly {@link cs.CSGetChatMsgRes.verify|verify} messages. * @function encodeDelimited * @memberof cs.CSGetChatMsgRes * @static * @param {cs.ICSGetChatMsgRes} message CSGetChatMsgRes message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSGetChatMsgRes.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a CSGetChatMsgRes message from the specified reader or buffer. * @function decode * @memberof cs.CSGetChatMsgRes * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {cs.CSGetChatMsgRes} CSGetChatMsgRes * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSGetChatMsgRes.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.cs.CSGetChatMsgRes(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { if (!(message.msgs && message.msgs.length)) message.msgs = []; message.msgs.push($root.cs.ChatMsg.decode(reader, reader.uint32())); break; } case 2: { message.chatRemainCount = reader.int32(); break; } case 3: { message.chatTotalCount = reader.int32(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a CSGetChatMsgRes message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof cs.CSGetChatMsgRes * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {cs.CSGetChatMsgRes} CSGetChatMsgRes * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSGetChatMsgRes.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a CSGetChatMsgRes message. * @function verify * @memberof cs.CSGetChatMsgRes * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ CSGetChatMsgRes.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.msgs != null && message.hasOwnProperty("msgs")) { if (!Array.isArray(message.msgs)) return "msgs: array expected"; for (var i = 0; i < message.msgs.length; ++i) { var error = $root.cs.ChatMsg.verify(message.msgs[i]); if (error) return "msgs." + error; } } if (message.chatRemainCount != null && message.hasOwnProperty("chatRemainCount")) if (!$util.isInteger(message.chatRemainCount)) return "chatRemainCount: integer expected"; if (message.chatTotalCount != null && message.hasOwnProperty("chatTotalCount")) if (!$util.isInteger(message.chatTotalCount)) return "chatTotalCount: integer expected"; return null; }; /** * Creates a CSGetChatMsgRes message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof cs.CSGetChatMsgRes * @static * @param {Object.} object Plain object * @returns {cs.CSGetChatMsgRes} CSGetChatMsgRes */ CSGetChatMsgRes.fromObject = function fromObject(object) { if (object instanceof $root.cs.CSGetChatMsgRes) return object; var message = new $root.cs.CSGetChatMsgRes(); if (object.msgs) { if (!Array.isArray(object.msgs)) throw TypeError(".cs.CSGetChatMsgRes.msgs: array expected"); message.msgs = []; for (var i = 0; i < object.msgs.length; ++i) { if (typeof object.msgs[i] !== "object") throw TypeError(".cs.CSGetChatMsgRes.msgs: object expected"); message.msgs[i] = $root.cs.ChatMsg.fromObject(object.msgs[i]); } } if (object.chatRemainCount != null) message.chatRemainCount = object.chatRemainCount | 0; if (object.chatTotalCount != null) message.chatTotalCount = object.chatTotalCount | 0; return message; }; /** * Creates a plain object from a CSGetChatMsgRes message. Also converts values to other types if specified. * @function toObject * @memberof cs.CSGetChatMsgRes * @static * @param {cs.CSGetChatMsgRes} message CSGetChatMsgRes * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ CSGetChatMsgRes.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) object.msgs = []; if (options.defaults) { object.chatRemainCount = 0; object.chatTotalCount = 0; } if (message.msgs && message.msgs.length) { object.msgs = []; for (var j = 0; j < message.msgs.length; ++j) object.msgs[j] = $root.cs.ChatMsg.toObject(message.msgs[j], options); } if (message.chatRemainCount != null && message.hasOwnProperty("chatRemainCount")) object.chatRemainCount = message.chatRemainCount; if (message.chatTotalCount != null && message.hasOwnProperty("chatTotalCount")) object.chatTotalCount = message.chatTotalCount; return object; }; /** * Converts this CSGetChatMsgRes to JSON. * @function toJSON * @memberof cs.CSGetChatMsgRes * @instance * @returns {Object.} JSON object */ CSGetChatMsgRes.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for CSGetChatMsgRes * @function getTypeUrl * @memberof cs.CSGetChatMsgRes * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ CSGetChatMsgRes.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/cs.CSGetChatMsgRes"; }; return CSGetChatMsgRes; })(); cs.CSGetChatRemainCountReq = (function() { /** * Properties of a CSGetChatRemainCountReq. * @memberof cs * @interface ICSGetChatRemainCountReq * @property {number|null} [id] CSGetChatRemainCountReq id */ /** * Constructs a new CSGetChatRemainCountReq. * @memberof cs * @classdesc Represents a CSGetChatRemainCountReq. * @implements ICSGetChatRemainCountReq * @constructor * @param {cs.ICSGetChatRemainCountReq=} [properties] Properties to set */ function CSGetChatRemainCountReq(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]]; } /** * CSGetChatRemainCountReq id. * @member {number} id * @memberof cs.CSGetChatRemainCountReq * @instance */ CSGetChatRemainCountReq.prototype.id = 0; /** * Creates a new CSGetChatRemainCountReq instance using the specified properties. * @function create * @memberof cs.CSGetChatRemainCountReq * @static * @param {cs.ICSGetChatRemainCountReq=} [properties] Properties to set * @returns {cs.CSGetChatRemainCountReq} CSGetChatRemainCountReq instance */ CSGetChatRemainCountReq.create = function create(properties) { return new CSGetChatRemainCountReq(properties); }; /** * Encodes the specified CSGetChatRemainCountReq message. Does not implicitly {@link cs.CSGetChatRemainCountReq.verify|verify} messages. * @function encode * @memberof cs.CSGetChatRemainCountReq * @static * @param {cs.ICSGetChatRemainCountReq} message CSGetChatRemainCountReq message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSGetChatRemainCountReq.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.id != null && Object.hasOwnProperty.call(message, "id")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.id); return writer; }; /** * Encodes the specified CSGetChatRemainCountReq message, length delimited. Does not implicitly {@link cs.CSGetChatRemainCountReq.verify|verify} messages. * @function encodeDelimited * @memberof cs.CSGetChatRemainCountReq * @static * @param {cs.ICSGetChatRemainCountReq} message CSGetChatRemainCountReq message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSGetChatRemainCountReq.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a CSGetChatRemainCountReq message from the specified reader or buffer. * @function decode * @memberof cs.CSGetChatRemainCountReq * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {cs.CSGetChatRemainCountReq} CSGetChatRemainCountReq * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSGetChatRemainCountReq.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.cs.CSGetChatRemainCountReq(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { message.id = reader.int32(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a CSGetChatRemainCountReq message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof cs.CSGetChatRemainCountReq * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {cs.CSGetChatRemainCountReq} CSGetChatRemainCountReq * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSGetChatRemainCountReq.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a CSGetChatRemainCountReq message. * @function verify * @memberof cs.CSGetChatRemainCountReq * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ CSGetChatRemainCountReq.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.id != null && message.hasOwnProperty("id")) if (!$util.isInteger(message.id)) return "id: integer expected"; return null; }; /** * Creates a CSGetChatRemainCountReq message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof cs.CSGetChatRemainCountReq * @static * @param {Object.} object Plain object * @returns {cs.CSGetChatRemainCountReq} CSGetChatRemainCountReq */ CSGetChatRemainCountReq.fromObject = function fromObject(object) { if (object instanceof $root.cs.CSGetChatRemainCountReq) return object; var message = new $root.cs.CSGetChatRemainCountReq(); if (object.id != null) message.id = object.id | 0; return message; }; /** * Creates a plain object from a CSGetChatRemainCountReq message. Also converts values to other types if specified. * @function toObject * @memberof cs.CSGetChatRemainCountReq * @static * @param {cs.CSGetChatRemainCountReq} message CSGetChatRemainCountReq * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ CSGetChatRemainCountReq.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) object.id = 0; if (message.id != null && message.hasOwnProperty("id")) object.id = message.id; return object; }; /** * Converts this CSGetChatRemainCountReq to JSON. * @function toJSON * @memberof cs.CSGetChatRemainCountReq * @instance * @returns {Object.} JSON object */ CSGetChatRemainCountReq.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for CSGetChatRemainCountReq * @function getTypeUrl * @memberof cs.CSGetChatRemainCountReq * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ CSGetChatRemainCountReq.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/cs.CSGetChatRemainCountReq"; }; return CSGetChatRemainCountReq; })(); cs.CSGetChatRemainCountRes = (function() { /** * Properties of a CSGetChatRemainCountRes. * @memberof cs * @interface ICSGetChatRemainCountRes * @property {number|null} [chatRemainCount] CSGetChatRemainCountRes chatRemainCount * @property {number|null} [chatTotalCount] CSGetChatRemainCountRes chatTotalCount */ /** * Constructs a new CSGetChatRemainCountRes. * @memberof cs * @classdesc Represents a CSGetChatRemainCountRes. * @implements ICSGetChatRemainCountRes * @constructor * @param {cs.ICSGetChatRemainCountRes=} [properties] Properties to set */ function CSGetChatRemainCountRes(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]]; } /** * CSGetChatRemainCountRes chatRemainCount. * @member {number} chatRemainCount * @memberof cs.CSGetChatRemainCountRes * @instance */ CSGetChatRemainCountRes.prototype.chatRemainCount = 0; /** * CSGetChatRemainCountRes chatTotalCount. * @member {number} chatTotalCount * @memberof cs.CSGetChatRemainCountRes * @instance */ CSGetChatRemainCountRes.prototype.chatTotalCount = 0; /** * Creates a new CSGetChatRemainCountRes instance using the specified properties. * @function create * @memberof cs.CSGetChatRemainCountRes * @static * @param {cs.ICSGetChatRemainCountRes=} [properties] Properties to set * @returns {cs.CSGetChatRemainCountRes} CSGetChatRemainCountRes instance */ CSGetChatRemainCountRes.create = function create(properties) { return new CSGetChatRemainCountRes(properties); }; /** * Encodes the specified CSGetChatRemainCountRes message. Does not implicitly {@link cs.CSGetChatRemainCountRes.verify|verify} messages. * @function encode * @memberof cs.CSGetChatRemainCountRes * @static * @param {cs.ICSGetChatRemainCountRes} message CSGetChatRemainCountRes message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSGetChatRemainCountRes.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.chatRemainCount != null && Object.hasOwnProperty.call(message, "chatRemainCount")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.chatRemainCount); if (message.chatTotalCount != null && Object.hasOwnProperty.call(message, "chatTotalCount")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.chatTotalCount); return writer; }; /** * Encodes the specified CSGetChatRemainCountRes message, length delimited. Does not implicitly {@link cs.CSGetChatRemainCountRes.verify|verify} messages. * @function encodeDelimited * @memberof cs.CSGetChatRemainCountRes * @static * @param {cs.ICSGetChatRemainCountRes} message CSGetChatRemainCountRes message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSGetChatRemainCountRes.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a CSGetChatRemainCountRes message from the specified reader or buffer. * @function decode * @memberof cs.CSGetChatRemainCountRes * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {cs.CSGetChatRemainCountRes} CSGetChatRemainCountRes * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSGetChatRemainCountRes.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.cs.CSGetChatRemainCountRes(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { message.chatRemainCount = reader.int32(); break; } case 2: { message.chatTotalCount = reader.int32(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a CSGetChatRemainCountRes message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof cs.CSGetChatRemainCountRes * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {cs.CSGetChatRemainCountRes} CSGetChatRemainCountRes * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSGetChatRemainCountRes.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a CSGetChatRemainCountRes message. * @function verify * @memberof cs.CSGetChatRemainCountRes * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ CSGetChatRemainCountRes.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.chatRemainCount != null && message.hasOwnProperty("chatRemainCount")) if (!$util.isInteger(message.chatRemainCount)) return "chatRemainCount: integer expected"; if (message.chatTotalCount != null && message.hasOwnProperty("chatTotalCount")) if (!$util.isInteger(message.chatTotalCount)) return "chatTotalCount: integer expected"; return null; }; /** * Creates a CSGetChatRemainCountRes message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof cs.CSGetChatRemainCountRes * @static * @param {Object.} object Plain object * @returns {cs.CSGetChatRemainCountRes} CSGetChatRemainCountRes */ CSGetChatRemainCountRes.fromObject = function fromObject(object) { if (object instanceof $root.cs.CSGetChatRemainCountRes) return object; var message = new $root.cs.CSGetChatRemainCountRes(); if (object.chatRemainCount != null) message.chatRemainCount = object.chatRemainCount | 0; if (object.chatTotalCount != null) message.chatTotalCount = object.chatTotalCount | 0; return message; }; /** * Creates a plain object from a CSGetChatRemainCountRes message. Also converts values to other types if specified. * @function toObject * @memberof cs.CSGetChatRemainCountRes * @static * @param {cs.CSGetChatRemainCountRes} message CSGetChatRemainCountRes * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ CSGetChatRemainCountRes.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.chatRemainCount = 0; object.chatTotalCount = 0; } if (message.chatRemainCount != null && message.hasOwnProperty("chatRemainCount")) object.chatRemainCount = message.chatRemainCount; if (message.chatTotalCount != null && message.hasOwnProperty("chatTotalCount")) object.chatTotalCount = message.chatTotalCount; return object; }; /** * Converts this CSGetChatRemainCountRes to JSON. * @function toJSON * @memberof cs.CSGetChatRemainCountRes * @instance * @returns {Object.} JSON object */ CSGetChatRemainCountRes.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for CSGetChatRemainCountRes * @function getTypeUrl * @memberof cs.CSGetChatRemainCountRes * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ CSGetChatRemainCountRes.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/cs.CSGetChatRemainCountRes"; }; return CSGetChatRemainCountRes; })(); cs.CSGetResConfigReq = (function() { /** * Properties of a CSGetResConfigReq. * @memberof cs * @interface ICSGetResConfigReq * @property {string|null} [resName] CSGetResConfigReq resName */ /** * Constructs a new CSGetResConfigReq. * @memberof cs * @classdesc Represents a CSGetResConfigReq. * @implements ICSGetResConfigReq * @constructor * @param {cs.ICSGetResConfigReq=} [properties] Properties to set */ function CSGetResConfigReq(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]]; } /** * CSGetResConfigReq resName. * @member {string} resName * @memberof cs.CSGetResConfigReq * @instance */ CSGetResConfigReq.prototype.resName = ""; /** * Creates a new CSGetResConfigReq instance using the specified properties. * @function create * @memberof cs.CSGetResConfigReq * @static * @param {cs.ICSGetResConfigReq=} [properties] Properties to set * @returns {cs.CSGetResConfigReq} CSGetResConfigReq instance */ CSGetResConfigReq.create = function create(properties) { return new CSGetResConfigReq(properties); }; /** * Encodes the specified CSGetResConfigReq message. Does not implicitly {@link cs.CSGetResConfigReq.verify|verify} messages. * @function encode * @memberof cs.CSGetResConfigReq * @static * @param {cs.ICSGetResConfigReq} message CSGetResConfigReq message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSGetResConfigReq.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.resName != null && Object.hasOwnProperty.call(message, "resName")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.resName); return writer; }; /** * Encodes the specified CSGetResConfigReq message, length delimited. Does not implicitly {@link cs.CSGetResConfigReq.verify|verify} messages. * @function encodeDelimited * @memberof cs.CSGetResConfigReq * @static * @param {cs.ICSGetResConfigReq} message CSGetResConfigReq message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSGetResConfigReq.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a CSGetResConfigReq message from the specified reader or buffer. * @function decode * @memberof cs.CSGetResConfigReq * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {cs.CSGetResConfigReq} CSGetResConfigReq * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSGetResConfigReq.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.cs.CSGetResConfigReq(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { message.resName = reader.string(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a CSGetResConfigReq message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof cs.CSGetResConfigReq * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {cs.CSGetResConfigReq} CSGetResConfigReq * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSGetResConfigReq.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a CSGetResConfigReq message. * @function verify * @memberof cs.CSGetResConfigReq * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ CSGetResConfigReq.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.resName != null && message.hasOwnProperty("resName")) if (!$util.isString(message.resName)) return "resName: string expected"; return null; }; /** * Creates a CSGetResConfigReq message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof cs.CSGetResConfigReq * @static * @param {Object.} object Plain object * @returns {cs.CSGetResConfigReq} CSGetResConfigReq */ CSGetResConfigReq.fromObject = function fromObject(object) { if (object instanceof $root.cs.CSGetResConfigReq) return object; var message = new $root.cs.CSGetResConfigReq(); if (object.resName != null) message.resName = String(object.resName); return message; }; /** * Creates a plain object from a CSGetResConfigReq message. Also converts values to other types if specified. * @function toObject * @memberof cs.CSGetResConfigReq * @static * @param {cs.CSGetResConfigReq} message CSGetResConfigReq * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ CSGetResConfigReq.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) object.resName = ""; if (message.resName != null && message.hasOwnProperty("resName")) object.resName = message.resName; return object; }; /** * Converts this CSGetResConfigReq to JSON. * @function toJSON * @memberof cs.CSGetResConfigReq * @instance * @returns {Object.} JSON object */ CSGetResConfigReq.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for CSGetResConfigReq * @function getTypeUrl * @memberof cs.CSGetResConfigReq * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ CSGetResConfigReq.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/cs.CSGetResConfigReq"; }; return CSGetResConfigReq; })(); cs.CSGetResConfigRes = (function() { /** * Properties of a CSGetResConfigRes. * @memberof cs * @interface ICSGetResConfigRes * @property {string|null} [data] CSGetResConfigRes data */ /** * Constructs a new CSGetResConfigRes. * @memberof cs * @classdesc Represents a CSGetResConfigRes. * @implements ICSGetResConfigRes * @constructor * @param {cs.ICSGetResConfigRes=} [properties] Properties to set */ function CSGetResConfigRes(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]]; } /** * CSGetResConfigRes data. * @member {string} data * @memberof cs.CSGetResConfigRes * @instance */ CSGetResConfigRes.prototype.data = ""; /** * Creates a new CSGetResConfigRes instance using the specified properties. * @function create * @memberof cs.CSGetResConfigRes * @static * @param {cs.ICSGetResConfigRes=} [properties] Properties to set * @returns {cs.CSGetResConfigRes} CSGetResConfigRes instance */ CSGetResConfigRes.create = function create(properties) { return new CSGetResConfigRes(properties); }; /** * Encodes the specified CSGetResConfigRes message. Does not implicitly {@link cs.CSGetResConfigRes.verify|verify} messages. * @function encode * @memberof cs.CSGetResConfigRes * @static * @param {cs.ICSGetResConfigRes} message CSGetResConfigRes message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSGetResConfigRes.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.data != null && Object.hasOwnProperty.call(message, "data")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.data); return writer; }; /** * Encodes the specified CSGetResConfigRes message, length delimited. Does not implicitly {@link cs.CSGetResConfigRes.verify|verify} messages. * @function encodeDelimited * @memberof cs.CSGetResConfigRes * @static * @param {cs.ICSGetResConfigRes} message CSGetResConfigRes message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSGetResConfigRes.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a CSGetResConfigRes message from the specified reader or buffer. * @function decode * @memberof cs.CSGetResConfigRes * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {cs.CSGetResConfigRes} CSGetResConfigRes * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSGetResConfigRes.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.cs.CSGetResConfigRes(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { message.data = reader.string(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a CSGetResConfigRes message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof cs.CSGetResConfigRes * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {cs.CSGetResConfigRes} CSGetResConfigRes * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSGetResConfigRes.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a CSGetResConfigRes message. * @function verify * @memberof cs.CSGetResConfigRes * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ CSGetResConfigRes.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.data != null && message.hasOwnProperty("data")) if (!$util.isString(message.data)) return "data: string expected"; return null; }; /** * Creates a CSGetResConfigRes message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof cs.CSGetResConfigRes * @static * @param {Object.} object Plain object * @returns {cs.CSGetResConfigRes} CSGetResConfigRes */ CSGetResConfigRes.fromObject = function fromObject(object) { if (object instanceof $root.cs.CSGetResConfigRes) return object; var message = new $root.cs.CSGetResConfigRes(); if (object.data != null) message.data = String(object.data); return message; }; /** * Creates a plain object from a CSGetResConfigRes message. Also converts values to other types if specified. * @function toObject * @memberof cs.CSGetResConfigRes * @static * @param {cs.CSGetResConfigRes} message CSGetResConfigRes * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ CSGetResConfigRes.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) object.data = ""; if (message.data != null && message.hasOwnProperty("data")) object.data = message.data; return object; }; /** * Converts this CSGetResConfigRes to JSON. * @function toJSON * @memberof cs.CSGetResConfigRes * @instance * @returns {Object.} JSON object */ CSGetResConfigRes.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for CSGetResConfigRes * @function getTypeUrl * @memberof cs.CSGetResConfigRes * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ CSGetResConfigRes.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/cs.CSGetResConfigRes"; }; return CSGetResConfigRes; })(); cs.CSGetPurchaseReq = (function() { /** * Properties of a CSGetPurchaseReq. * @memberof cs * @interface ICSGetPurchaseReq */ /** * Constructs a new CSGetPurchaseReq. * @memberof cs * @classdesc Represents a CSGetPurchaseReq. * @implements ICSGetPurchaseReq * @constructor * @param {cs.ICSGetPurchaseReq=} [properties] Properties to set */ function CSGetPurchaseReq(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 CSGetPurchaseReq instance using the specified properties. * @function create * @memberof cs.CSGetPurchaseReq * @static * @param {cs.ICSGetPurchaseReq=} [properties] Properties to set * @returns {cs.CSGetPurchaseReq} CSGetPurchaseReq instance */ CSGetPurchaseReq.create = function create(properties) { return new CSGetPurchaseReq(properties); }; /** * Encodes the specified CSGetPurchaseReq message. Does not implicitly {@link cs.CSGetPurchaseReq.verify|verify} messages. * @function encode * @memberof cs.CSGetPurchaseReq * @static * @param {cs.ICSGetPurchaseReq} message CSGetPurchaseReq message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSGetPurchaseReq.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); return writer; }; /** * Encodes the specified CSGetPurchaseReq message, length delimited. Does not implicitly {@link cs.CSGetPurchaseReq.verify|verify} messages. * @function encodeDelimited * @memberof cs.CSGetPurchaseReq * @static * @param {cs.ICSGetPurchaseReq} message CSGetPurchaseReq message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSGetPurchaseReq.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a CSGetPurchaseReq message from the specified reader or buffer. * @function decode * @memberof cs.CSGetPurchaseReq * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {cs.CSGetPurchaseReq} CSGetPurchaseReq * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSGetPurchaseReq.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.cs.CSGetPurchaseReq(); 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 CSGetPurchaseReq message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof cs.CSGetPurchaseReq * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {cs.CSGetPurchaseReq} CSGetPurchaseReq * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSGetPurchaseReq.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a CSGetPurchaseReq message. * @function verify * @memberof cs.CSGetPurchaseReq * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ CSGetPurchaseReq.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; return null; }; /** * Creates a CSGetPurchaseReq message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof cs.CSGetPurchaseReq * @static * @param {Object.} object Plain object * @returns {cs.CSGetPurchaseReq} CSGetPurchaseReq */ CSGetPurchaseReq.fromObject = function fromObject(object) { if (object instanceof $root.cs.CSGetPurchaseReq) return object; return new $root.cs.CSGetPurchaseReq(); }; /** * Creates a plain object from a CSGetPurchaseReq message. Also converts values to other types if specified. * @function toObject * @memberof cs.CSGetPurchaseReq * @static * @param {cs.CSGetPurchaseReq} message CSGetPurchaseReq * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ CSGetPurchaseReq.toObject = function toObject() { return {}; }; /** * Converts this CSGetPurchaseReq to JSON. * @function toJSON * @memberof cs.CSGetPurchaseReq * @instance * @returns {Object.} JSON object */ CSGetPurchaseReq.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for CSGetPurchaseReq * @function getTypeUrl * @memberof cs.CSGetPurchaseReq * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ CSGetPurchaseReq.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/cs.CSGetPurchaseReq"; }; return CSGetPurchaseReq; })(); cs.CSGetPurchaseRes = (function() { /** * Properties of a CSGetPurchaseRes. * @memberof cs * @interface ICSGetPurchaseRes * @property {Array.|null} [items] CSGetPurchaseRes items */ /** * Constructs a new CSGetPurchaseRes. * @memberof cs * @classdesc Represents a CSGetPurchaseRes. * @implements ICSGetPurchaseRes * @constructor * @param {cs.ICSGetPurchaseRes=} [properties] Properties to set */ function CSGetPurchaseRes(properties) { this.items = []; 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]]; } /** * CSGetPurchaseRes items. * @member {Array.} items * @memberof cs.CSGetPurchaseRes * @instance */ CSGetPurchaseRes.prototype.items = $util.emptyArray; /** * Creates a new CSGetPurchaseRes instance using the specified properties. * @function create * @memberof cs.CSGetPurchaseRes * @static * @param {cs.ICSGetPurchaseRes=} [properties] Properties to set * @returns {cs.CSGetPurchaseRes} CSGetPurchaseRes instance */ CSGetPurchaseRes.create = function create(properties) { return new CSGetPurchaseRes(properties); }; /** * Encodes the specified CSGetPurchaseRes message. Does not implicitly {@link cs.CSGetPurchaseRes.verify|verify} messages. * @function encode * @memberof cs.CSGetPurchaseRes * @static * @param {cs.ICSGetPurchaseRes} message CSGetPurchaseRes message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSGetPurchaseRes.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.items != null && message.items.length) for (var i = 0; i < message.items.length; ++i) $root.cs.PurchaseConfig.encode(message.items[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** * Encodes the specified CSGetPurchaseRes message, length delimited. Does not implicitly {@link cs.CSGetPurchaseRes.verify|verify} messages. * @function encodeDelimited * @memberof cs.CSGetPurchaseRes * @static * @param {cs.ICSGetPurchaseRes} message CSGetPurchaseRes message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSGetPurchaseRes.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a CSGetPurchaseRes message from the specified reader or buffer. * @function decode * @memberof cs.CSGetPurchaseRes * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {cs.CSGetPurchaseRes} CSGetPurchaseRes * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSGetPurchaseRes.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.cs.CSGetPurchaseRes(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { if (!(message.items && message.items.length)) message.items = []; message.items.push($root.cs.PurchaseConfig.decode(reader, reader.uint32())); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a CSGetPurchaseRes message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof cs.CSGetPurchaseRes * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {cs.CSGetPurchaseRes} CSGetPurchaseRes * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSGetPurchaseRes.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a CSGetPurchaseRes message. * @function verify * @memberof cs.CSGetPurchaseRes * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ CSGetPurchaseRes.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.items != null && message.hasOwnProperty("items")) { if (!Array.isArray(message.items)) return "items: array expected"; for (var i = 0; i < message.items.length; ++i) { var error = $root.cs.PurchaseConfig.verify(message.items[i]); if (error) return "items." + error; } } return null; }; /** * Creates a CSGetPurchaseRes message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof cs.CSGetPurchaseRes * @static * @param {Object.} object Plain object * @returns {cs.CSGetPurchaseRes} CSGetPurchaseRes */ CSGetPurchaseRes.fromObject = function fromObject(object) { if (object instanceof $root.cs.CSGetPurchaseRes) return object; var message = new $root.cs.CSGetPurchaseRes(); if (object.items) { if (!Array.isArray(object.items)) throw TypeError(".cs.CSGetPurchaseRes.items: array expected"); message.items = []; for (var i = 0; i < object.items.length; ++i) { if (typeof object.items[i] !== "object") throw TypeError(".cs.CSGetPurchaseRes.items: object expected"); message.items[i] = $root.cs.PurchaseConfig.fromObject(object.items[i]); } } return message; }; /** * Creates a plain object from a CSGetPurchaseRes message. Also converts values to other types if specified. * @function toObject * @memberof cs.CSGetPurchaseRes * @static * @param {cs.CSGetPurchaseRes} message CSGetPurchaseRes * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ CSGetPurchaseRes.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) object.items = []; if (message.items && message.items.length) { object.items = []; for (var j = 0; j < message.items.length; ++j) object.items[j] = $root.cs.PurchaseConfig.toObject(message.items[j], options); } return object; }; /** * Converts this CSGetPurchaseRes to JSON. * @function toJSON * @memberof cs.CSGetPurchaseRes * @instance * @returns {Object.} JSON object */ CSGetPurchaseRes.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for CSGetPurchaseRes * @function getTypeUrl * @memberof cs.CSGetPurchaseRes * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ CSGetPurchaseRes.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/cs.CSGetPurchaseRes"; }; return CSGetPurchaseRes; })(); /** * Category enum. * @name cs.Category * @enum {number} * @property {number} Category_mature=0 Category_mature value * @property {number} Category_eighteen=1 Category_eighteen value * @property {number} Category_qinfan=2 Category_qinfan value * @property {number} Category_luanlun=3 Category_luanlun value * @property {number} Category_bdsm=4 Category_bdsm value * @property {number} Category_loli=5 Category_loli value * @property {number} Category_upcomming=6 Category_upcomming value */ cs.Category = (function() { var valuesById = {}, values = Object.create(valuesById); values[valuesById[0] = "Category_mature"] = 0; values[valuesById[1] = "Category_eighteen"] = 1; values[valuesById[2] = "Category_qinfan"] = 2; values[valuesById[3] = "Category_luanlun"] = 3; values[valuesById[4] = "Category_bdsm"] = 4; values[valuesById[5] = "Category_loli"] = 5; values[valuesById[6] = "Category_upcomming"] = 6; return values; })(); /** * PriceType enum. * @name cs.PriceType * @enum {number} * @property {number} PriceType_free=0 PriceType_free value * @property {number} PriceType_first_time_free=1 PriceType_first_time_free value * @property {number} PriceType_pay=2 PriceType_pay value */ cs.PriceType = (function() { var valuesById = {}, values = Object.create(valuesById); values[valuesById[0] = "PriceType_free"] = 0; values[valuesById[1] = "PriceType_first_time_free"] = 1; values[valuesById[2] = "PriceType_pay"] = 2; return values; })(); /** * VideoEmotion enum. * @name cs.VideoEmotion * @enum {number} * @property {number} VideoEmotion_calm_down=0 VideoEmotion_calm_down value * @property {number} VideoEmotion_arousal=1 VideoEmotion_arousal value * @property {number} VideoEmotion_desire=2 VideoEmotion_desire value * @property {number} VideoEmotion_passion=3 VideoEmotion_passion value * @property {number} VideoEmotion_orgasm=4 VideoEmotion_orgasm value */ cs.VideoEmotion = (function() { var valuesById = {}, values = Object.create(valuesById); values[valuesById[0] = "VideoEmotion_calm_down"] = 0; values[valuesById[1] = "VideoEmotion_arousal"] = 1; values[valuesById[2] = "VideoEmotion_desire"] = 2; values[valuesById[3] = "VideoEmotion_passion"] = 3; values[valuesById[4] = "VideoEmotion_orgasm"] = 4; return values; })(); cs.AiCharacters = (function() { /** * Properties of an AiCharacters. * @memberof cs * @interface IAiCharacters * @property {number|null} [id] AiCharacters id * @property {string|null} [basePrompt] AiCharacters basePrompt * @property {string|null} [additionPrompt] AiCharacters additionPrompt */ /** * Constructs a new AiCharacters. * @memberof cs * @classdesc Represents an AiCharacters. * @implements IAiCharacters * @constructor * @param {cs.IAiCharacters=} [properties] Properties to set */ function AiCharacters(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]]; } /** * AiCharacters id. * @member {number} id * @memberof cs.AiCharacters * @instance */ AiCharacters.prototype.id = 0; /** * AiCharacters basePrompt. * @member {string} basePrompt * @memberof cs.AiCharacters * @instance */ AiCharacters.prototype.basePrompt = ""; /** * AiCharacters additionPrompt. * @member {string} additionPrompt * @memberof cs.AiCharacters * @instance */ AiCharacters.prototype.additionPrompt = ""; /** * Creates a new AiCharacters instance using the specified properties. * @function create * @memberof cs.AiCharacters * @static * @param {cs.IAiCharacters=} [properties] Properties to set * @returns {cs.AiCharacters} AiCharacters instance */ AiCharacters.create = function create(properties) { return new AiCharacters(properties); }; /** * Encodes the specified AiCharacters message. Does not implicitly {@link cs.AiCharacters.verify|verify} messages. * @function encode * @memberof cs.AiCharacters * @static * @param {cs.IAiCharacters} message AiCharacters message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ AiCharacters.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.id != null && Object.hasOwnProperty.call(message, "id")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.id); if (message.basePrompt != null && Object.hasOwnProperty.call(message, "basePrompt")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.basePrompt); if (message.additionPrompt != null && Object.hasOwnProperty.call(message, "additionPrompt")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.additionPrompt); return writer; }; /** * Encodes the specified AiCharacters message, length delimited. Does not implicitly {@link cs.AiCharacters.verify|verify} messages. * @function encodeDelimited * @memberof cs.AiCharacters * @static * @param {cs.IAiCharacters} message AiCharacters message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ AiCharacters.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes an AiCharacters message from the specified reader or buffer. * @function decode * @memberof cs.AiCharacters * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {cs.AiCharacters} AiCharacters * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ AiCharacters.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.cs.AiCharacters(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { message.id = reader.int32(); break; } case 2: { message.basePrompt = reader.string(); break; } case 3: { message.additionPrompt = reader.string(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes an AiCharacters message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof cs.AiCharacters * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {cs.AiCharacters} AiCharacters * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ AiCharacters.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies an AiCharacters message. * @function verify * @memberof cs.AiCharacters * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ AiCharacters.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.id != null && message.hasOwnProperty("id")) if (!$util.isInteger(message.id)) return "id: integer expected"; if (message.basePrompt != null && message.hasOwnProperty("basePrompt")) if (!$util.isString(message.basePrompt)) return "basePrompt: string expected"; if (message.additionPrompt != null && message.hasOwnProperty("additionPrompt")) if (!$util.isString(message.additionPrompt)) return "additionPrompt: string expected"; return null; }; /** * Creates an AiCharacters message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof cs.AiCharacters * @static * @param {Object.} object Plain object * @returns {cs.AiCharacters} AiCharacters */ AiCharacters.fromObject = function fromObject(object) { if (object instanceof $root.cs.AiCharacters) return object; var message = new $root.cs.AiCharacters(); if (object.id != null) message.id = object.id | 0; if (object.basePrompt != null) message.basePrompt = String(object.basePrompt); if (object.additionPrompt != null) message.additionPrompt = String(object.additionPrompt); return message; }; /** * Creates a plain object from an AiCharacters message. Also converts values to other types if specified. * @function toObject * @memberof cs.AiCharacters * @static * @param {cs.AiCharacters} message AiCharacters * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ AiCharacters.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.id = 0; object.basePrompt = ""; object.additionPrompt = ""; } if (message.id != null && message.hasOwnProperty("id")) object.id = message.id; if (message.basePrompt != null && message.hasOwnProperty("basePrompt")) object.basePrompt = message.basePrompt; if (message.additionPrompt != null && message.hasOwnProperty("additionPrompt")) object.additionPrompt = message.additionPrompt; return object; }; /** * Converts this AiCharacters to JSON. * @function toJSON * @memberof cs.AiCharacters * @instance * @returns {Object.} JSON object */ AiCharacters.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for AiCharacters * @function getTypeUrl * @memberof cs.AiCharacters * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ AiCharacters.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/cs.AiCharacters"; }; return AiCharacters; })(); cs.Girls = (function() { /** * Properties of a Girls. * @memberof cs * @interface IGirls * @property {number|null} [id] Girls id * @property {string|null} [nameKey] Girls nameKey * @property {string|null} [age] Girls age * @property {cs.Category|null} [category] Girls category * @property {string|null} [tagKey] Girls tagKey * @property {cs.PriceType|null} [priceType] Girls priceType * @property {number|null} [price] Girls price * @property {number|null} [vipUnlock] Girls vipUnlock * @property {string|null} [avatarPath] Girls avatarPath * @property {string|null} [listAvatarPath] Girls listAvatarPath */ /** * Constructs a new Girls. * @memberof cs * @classdesc Represents a Girls. * @implements IGirls * @constructor * @param {cs.IGirls=} [properties] Properties to set */ function Girls(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]]; } /** * Girls id. * @member {number} id * @memberof cs.Girls * @instance */ Girls.prototype.id = 0; /** * Girls nameKey. * @member {string} nameKey * @memberof cs.Girls * @instance */ Girls.prototype.nameKey = ""; /** * Girls age. * @member {string} age * @memberof cs.Girls * @instance */ Girls.prototype.age = ""; /** * Girls category. * @member {cs.Category} category * @memberof cs.Girls * @instance */ Girls.prototype.category = 0; /** * Girls tagKey. * @member {string} tagKey * @memberof cs.Girls * @instance */ Girls.prototype.tagKey = ""; /** * Girls priceType. * @member {cs.PriceType} priceType * @memberof cs.Girls * @instance */ Girls.prototype.priceType = 0; /** * Girls price. * @member {number} price * @memberof cs.Girls * @instance */ Girls.prototype.price = 0; /** * Girls vipUnlock. * @member {number} vipUnlock * @memberof cs.Girls * @instance */ Girls.prototype.vipUnlock = 0; /** * Girls avatarPath. * @member {string} avatarPath * @memberof cs.Girls * @instance */ Girls.prototype.avatarPath = ""; /** * Girls listAvatarPath. * @member {string} listAvatarPath * @memberof cs.Girls * @instance */ Girls.prototype.listAvatarPath = ""; /** * Creates a new Girls instance using the specified properties. * @function create * @memberof cs.Girls * @static * @param {cs.IGirls=} [properties] Properties to set * @returns {cs.Girls} Girls instance */ Girls.create = function create(properties) { return new Girls(properties); }; /** * Encodes the specified Girls message. Does not implicitly {@link cs.Girls.verify|verify} messages. * @function encode * @memberof cs.Girls * @static * @param {cs.IGirls} message Girls message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ Girls.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.id != null && Object.hasOwnProperty.call(message, "id")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.id); if (message.nameKey != null && Object.hasOwnProperty.call(message, "nameKey")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.nameKey); if (message.age != null && Object.hasOwnProperty.call(message, "age")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.age); if (message.category != null && Object.hasOwnProperty.call(message, "category")) writer.uint32(/* id 4, wireType 0 =*/32).int32(message.category); if (message.tagKey != null && Object.hasOwnProperty.call(message, "tagKey")) writer.uint32(/* id 5, wireType 2 =*/42).string(message.tagKey); if (message.priceType != null && Object.hasOwnProperty.call(message, "priceType")) writer.uint32(/* id 6, wireType 0 =*/48).int32(message.priceType); if (message.price != null && Object.hasOwnProperty.call(message, "price")) writer.uint32(/* id 7, wireType 0 =*/56).int32(message.price); if (message.vipUnlock != null && Object.hasOwnProperty.call(message, "vipUnlock")) writer.uint32(/* id 8, wireType 0 =*/64).int32(message.vipUnlock); if (message.avatarPath != null && Object.hasOwnProperty.call(message, "avatarPath")) writer.uint32(/* id 9, wireType 2 =*/74).string(message.avatarPath); if (message.listAvatarPath != null && Object.hasOwnProperty.call(message, "listAvatarPath")) writer.uint32(/* id 10, wireType 2 =*/82).string(message.listAvatarPath); return writer; }; /** * Encodes the specified Girls message, length delimited. Does not implicitly {@link cs.Girls.verify|verify} messages. * @function encodeDelimited * @memberof cs.Girls * @static * @param {cs.IGirls} message Girls message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ Girls.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a Girls message from the specified reader or buffer. * @function decode * @memberof cs.Girls * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {cs.Girls} Girls * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ Girls.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.cs.Girls(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { message.id = reader.int32(); break; } case 2: { message.nameKey = reader.string(); break; } case 3: { message.age = reader.string(); break; } case 4: { message.category = reader.int32(); break; } case 5: { message.tagKey = reader.string(); break; } case 6: { message.priceType = reader.int32(); break; } case 7: { message.price = reader.int32(); break; } case 8: { message.vipUnlock = reader.int32(); break; } case 9: { message.avatarPath = reader.string(); break; } case 10: { message.listAvatarPath = reader.string(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a Girls message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof cs.Girls * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {cs.Girls} Girls * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ Girls.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a Girls message. * @function verify * @memberof cs.Girls * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ Girls.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.id != null && message.hasOwnProperty("id")) if (!$util.isInteger(message.id)) return "id: integer expected"; if (message.nameKey != null && message.hasOwnProperty("nameKey")) if (!$util.isString(message.nameKey)) return "nameKey: string expected"; if (message.age != null && message.hasOwnProperty("age")) if (!$util.isString(message.age)) return "age: string expected"; if (message.category != null && message.hasOwnProperty("category")) switch (message.category) { default: return "category: enum value expected"; case 0: case 1: case 2: case 3: case 4: case 5: case 6: break; } if (message.tagKey != null && message.hasOwnProperty("tagKey")) if (!$util.isString(message.tagKey)) return "tagKey: string expected"; if (message.priceType != null && message.hasOwnProperty("priceType")) switch (message.priceType) { default: return "priceType: enum value expected"; case 0: case 1: case 2: break; } if (message.price != null && message.hasOwnProperty("price")) if (!$util.isInteger(message.price)) return "price: integer expected"; if (message.vipUnlock != null && message.hasOwnProperty("vipUnlock")) if (!$util.isInteger(message.vipUnlock)) return "vipUnlock: integer expected"; if (message.avatarPath != null && message.hasOwnProperty("avatarPath")) if (!$util.isString(message.avatarPath)) return "avatarPath: string expected"; if (message.listAvatarPath != null && message.hasOwnProperty("listAvatarPath")) if (!$util.isString(message.listAvatarPath)) return "listAvatarPath: string expected"; return null; }; /** * Creates a Girls message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof cs.Girls * @static * @param {Object.} object Plain object * @returns {cs.Girls} Girls */ Girls.fromObject = function fromObject(object) { if (object instanceof $root.cs.Girls) return object; var message = new $root.cs.Girls(); if (object.id != null) message.id = object.id | 0; if (object.nameKey != null) message.nameKey = String(object.nameKey); if (object.age != null) message.age = String(object.age); switch (object.category) { default: if (typeof object.category === "number") { message.category = object.category; break; } break; case "Category_mature": case 0: message.category = 0; break; case "Category_eighteen": case 1: message.category = 1; break; case "Category_qinfan": case 2: message.category = 2; break; case "Category_luanlun": case 3: message.category = 3; break; case "Category_bdsm": case 4: message.category = 4; break; case "Category_loli": case 5: message.category = 5; break; case "Category_upcomming": case 6: message.category = 6; break; } if (object.tagKey != null) message.tagKey = String(object.tagKey); switch (object.priceType) { default: if (typeof object.priceType === "number") { message.priceType = object.priceType; break; } break; case "PriceType_free": case 0: message.priceType = 0; break; case "PriceType_first_time_free": case 1: message.priceType = 1; break; case "PriceType_pay": case 2: message.priceType = 2; break; } if (object.price != null) message.price = object.price | 0; if (object.vipUnlock != null) message.vipUnlock = object.vipUnlock | 0; if (object.avatarPath != null) message.avatarPath = String(object.avatarPath); if (object.listAvatarPath != null) message.listAvatarPath = String(object.listAvatarPath); return message; }; /** * Creates a plain object from a Girls message. Also converts values to other types if specified. * @function toObject * @memberof cs.Girls * @static * @param {cs.Girls} message Girls * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ Girls.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.id = 0; object.nameKey = ""; object.age = ""; object.category = options.enums === String ? "Category_mature" : 0; object.tagKey = ""; object.priceType = options.enums === String ? "PriceType_free" : 0; object.price = 0; object.vipUnlock = 0; object.avatarPath = ""; object.listAvatarPath = ""; } if (message.id != null && message.hasOwnProperty("id")) object.id = message.id; if (message.nameKey != null && message.hasOwnProperty("nameKey")) object.nameKey = message.nameKey; if (message.age != null && message.hasOwnProperty("age")) object.age = message.age; if (message.category != null && message.hasOwnProperty("category")) object.category = options.enums === String ? $root.cs.Category[message.category] === undefined ? message.category : $root.cs.Category[message.category] : message.category; if (message.tagKey != null && message.hasOwnProperty("tagKey")) object.tagKey = message.tagKey; if (message.priceType != null && message.hasOwnProperty("priceType")) object.priceType = options.enums === String ? $root.cs.PriceType[message.priceType] === undefined ? message.priceType : $root.cs.PriceType[message.priceType] : message.priceType; if (message.price != null && message.hasOwnProperty("price")) object.price = message.price; if (message.vipUnlock != null && message.hasOwnProperty("vipUnlock")) object.vipUnlock = message.vipUnlock; if (message.avatarPath != null && message.hasOwnProperty("avatarPath")) object.avatarPath = message.avatarPath; if (message.listAvatarPath != null && message.hasOwnProperty("listAvatarPath")) object.listAvatarPath = message.listAvatarPath; return object; }; /** * Converts this Girls to JSON. * @function toJSON * @memberof cs.Girls * @instance * @returns {Object.} JSON object */ Girls.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for Girls * @function getTypeUrl * @memberof cs.Girls * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ Girls.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/cs.Girls"; }; return Girls; })(); cs.GirlsDetail = (function() { /** * Properties of a GirlsDetail. * @memberof cs * @interface IGirlsDetail * @property {number|null} [id] GirlsDetail id * @property {string|null} [detailDesc] GirlsDetail detailDesc * @property {Array.|null} [commercialImages] GirlsDetail commercialImages * @property {Array.|null} [commercialVideos] GirlsDetail commercialVideos */ /** * Constructs a new GirlsDetail. * @memberof cs * @classdesc Represents a GirlsDetail. * @implements IGirlsDetail * @constructor * @param {cs.IGirlsDetail=} [properties] Properties to set */ function GirlsDetail(properties) { this.commercialImages = []; this.commercialVideos = []; 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]]; } /** * GirlsDetail id. * @member {number} id * @memberof cs.GirlsDetail * @instance */ GirlsDetail.prototype.id = 0; /** * GirlsDetail detailDesc. * @member {string} detailDesc * @memberof cs.GirlsDetail * @instance */ GirlsDetail.prototype.detailDesc = ""; /** * GirlsDetail commercialImages. * @member {Array.} commercialImages * @memberof cs.GirlsDetail * @instance */ GirlsDetail.prototype.commercialImages = $util.emptyArray; /** * GirlsDetail commercialVideos. * @member {Array.} commercialVideos * @memberof cs.GirlsDetail * @instance */ GirlsDetail.prototype.commercialVideos = $util.emptyArray; /** * Creates a new GirlsDetail instance using the specified properties. * @function create * @memberof cs.GirlsDetail * @static * @param {cs.IGirlsDetail=} [properties] Properties to set * @returns {cs.GirlsDetail} GirlsDetail instance */ GirlsDetail.create = function create(properties) { return new GirlsDetail(properties); }; /** * Encodes the specified GirlsDetail message. Does not implicitly {@link cs.GirlsDetail.verify|verify} messages. * @function encode * @memberof cs.GirlsDetail * @static * @param {cs.IGirlsDetail} message GirlsDetail message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ GirlsDetail.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.id != null && Object.hasOwnProperty.call(message, "id")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.id); if (message.detailDesc != null && Object.hasOwnProperty.call(message, "detailDesc")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.detailDesc); if (message.commercialImages != null && message.commercialImages.length) for (var i = 0; i < message.commercialImages.length; ++i) $root.cs.PurchaseCommercialImage.encode(message.commercialImages[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); if (message.commercialVideos != null && message.commercialVideos.length) for (var i = 0; i < message.commercialVideos.length; ++i) $root.cs.PurchaseCommercialVideo.encode(message.commercialVideos[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; /** * Encodes the specified GirlsDetail message, length delimited. Does not implicitly {@link cs.GirlsDetail.verify|verify} messages. * @function encodeDelimited * @memberof cs.GirlsDetail * @static * @param {cs.IGirlsDetail} message GirlsDetail message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ GirlsDetail.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a GirlsDetail message from the specified reader or buffer. * @function decode * @memberof cs.GirlsDetail * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {cs.GirlsDetail} GirlsDetail * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ GirlsDetail.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.cs.GirlsDetail(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { message.id = reader.int32(); break; } case 2: { message.detailDesc = reader.string(); break; } case 3: { if (!(message.commercialImages && message.commercialImages.length)) message.commercialImages = []; message.commercialImages.push($root.cs.PurchaseCommercialImage.decode(reader, reader.uint32())); break; } case 4: { if (!(message.commercialVideos && message.commercialVideos.length)) message.commercialVideos = []; message.commercialVideos.push($root.cs.PurchaseCommercialVideo.decode(reader, reader.uint32())); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a GirlsDetail message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof cs.GirlsDetail * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {cs.GirlsDetail} GirlsDetail * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ GirlsDetail.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a GirlsDetail message. * @function verify * @memberof cs.GirlsDetail * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ GirlsDetail.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.id != null && message.hasOwnProperty("id")) if (!$util.isInteger(message.id)) return "id: integer expected"; if (message.detailDesc != null && message.hasOwnProperty("detailDesc")) if (!$util.isString(message.detailDesc)) return "detailDesc: string expected"; if (message.commercialImages != null && message.hasOwnProperty("commercialImages")) { if (!Array.isArray(message.commercialImages)) return "commercialImages: array expected"; for (var i = 0; i < message.commercialImages.length; ++i) { var error = $root.cs.PurchaseCommercialImage.verify(message.commercialImages[i]); if (error) return "commercialImages." + error; } } if (message.commercialVideos != null && message.hasOwnProperty("commercialVideos")) { if (!Array.isArray(message.commercialVideos)) return "commercialVideos: array expected"; for (var i = 0; i < message.commercialVideos.length; ++i) { var error = $root.cs.PurchaseCommercialVideo.verify(message.commercialVideos[i]); if (error) return "commercialVideos." + error; } } return null; }; /** * Creates a GirlsDetail message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof cs.GirlsDetail * @static * @param {Object.} object Plain object * @returns {cs.GirlsDetail} GirlsDetail */ GirlsDetail.fromObject = function fromObject(object) { if (object instanceof $root.cs.GirlsDetail) return object; var message = new $root.cs.GirlsDetail(); if (object.id != null) message.id = object.id | 0; if (object.detailDesc != null) message.detailDesc = String(object.detailDesc); if (object.commercialImages) { if (!Array.isArray(object.commercialImages)) throw TypeError(".cs.GirlsDetail.commercialImages: array expected"); message.commercialImages = []; for (var i = 0; i < object.commercialImages.length; ++i) { if (typeof object.commercialImages[i] !== "object") throw TypeError(".cs.GirlsDetail.commercialImages: object expected"); message.commercialImages[i] = $root.cs.PurchaseCommercialImage.fromObject(object.commercialImages[i]); } } if (object.commercialVideos) { if (!Array.isArray(object.commercialVideos)) throw TypeError(".cs.GirlsDetail.commercialVideos: array expected"); message.commercialVideos = []; for (var i = 0; i < object.commercialVideos.length; ++i) { if (typeof object.commercialVideos[i] !== "object") throw TypeError(".cs.GirlsDetail.commercialVideos: object expected"); message.commercialVideos[i] = $root.cs.PurchaseCommercialVideo.fromObject(object.commercialVideos[i]); } } return message; }; /** * Creates a plain object from a GirlsDetail message. Also converts values to other types if specified. * @function toObject * @memberof cs.GirlsDetail * @static * @param {cs.GirlsDetail} message GirlsDetail * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ GirlsDetail.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) { object.commercialImages = []; object.commercialVideos = []; } if (options.defaults) { object.id = 0; object.detailDesc = ""; } if (message.id != null && message.hasOwnProperty("id")) object.id = message.id; if (message.detailDesc != null && message.hasOwnProperty("detailDesc")) object.detailDesc = message.detailDesc; if (message.commercialImages && message.commercialImages.length) { object.commercialImages = []; for (var j = 0; j < message.commercialImages.length; ++j) object.commercialImages[j] = $root.cs.PurchaseCommercialImage.toObject(message.commercialImages[j], options); } if (message.commercialVideos && message.commercialVideos.length) { object.commercialVideos = []; for (var j = 0; j < message.commercialVideos.length; ++j) object.commercialVideos[j] = $root.cs.PurchaseCommercialVideo.toObject(message.commercialVideos[j], options); } return object; }; /** * Converts this GirlsDetail to JSON. * @function toJSON * @memberof cs.GirlsDetail * @instance * @returns {Object.} JSON object */ GirlsDetail.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for GirlsDetail * @function getTypeUrl * @memberof cs.GirlsDetail * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ GirlsDetail.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/cs.GirlsDetail"; }; return GirlsDetail; })(); cs.GlobalConfig = (function() { /** * Properties of a GlobalConfig. * @memberof cs * @interface IGlobalConfig * @property {string|null} [ApiKey] GlobalConfig ApiKey * @property {string|null} [emotionApiKey] GlobalConfig emotionApiKey * @property {string|null} [Model] GlobalConfig Model * @property {number|null} [Temperature] GlobalConfig Temperature * @property {number|null} [MaxTokens] GlobalConfig MaxTokens * @property {number|null} [Timeout] GlobalConfig Timeout * @property {number|null} [FreeChatTimes] GlobalConfig FreeChatTimes * @property {number|null} [OnceChatAddScore] GlobalConfig OnceChatAddScore * @property {number|null} [ScoreExchangeStarLevel] GlobalConfig ScoreExchangeStarLevel * @property {string|null} [GameName] GlobalConfig GameName * @property {string|null} [EmotionBasePrompt] GlobalConfig EmotionBasePrompt * @property {string|null} [girlBasePrompt] GlobalConfig girlBasePrompt */ /** * Constructs a new GlobalConfig. * @memberof cs * @classdesc Represents a GlobalConfig. * @implements IGlobalConfig * @constructor * @param {cs.IGlobalConfig=} [properties] Properties to set */ function GlobalConfig(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]]; } /** * GlobalConfig ApiKey. * @member {string} ApiKey * @memberof cs.GlobalConfig * @instance */ GlobalConfig.prototype.ApiKey = ""; /** * GlobalConfig emotionApiKey. * @member {string} emotionApiKey * @memberof cs.GlobalConfig * @instance */ GlobalConfig.prototype.emotionApiKey = ""; /** * GlobalConfig Model. * @member {string} Model * @memberof cs.GlobalConfig * @instance */ GlobalConfig.prototype.Model = ""; /** * GlobalConfig Temperature. * @member {number} Temperature * @memberof cs.GlobalConfig * @instance */ GlobalConfig.prototype.Temperature = 0; /** * GlobalConfig MaxTokens. * @member {number} MaxTokens * @memberof cs.GlobalConfig * @instance */ GlobalConfig.prototype.MaxTokens = 0; /** * GlobalConfig Timeout. * @member {number} Timeout * @memberof cs.GlobalConfig * @instance */ GlobalConfig.prototype.Timeout = 0; /** * GlobalConfig FreeChatTimes. * @member {number} FreeChatTimes * @memberof cs.GlobalConfig * @instance */ GlobalConfig.prototype.FreeChatTimes = 0; /** * GlobalConfig OnceChatAddScore. * @member {number} OnceChatAddScore * @memberof cs.GlobalConfig * @instance */ GlobalConfig.prototype.OnceChatAddScore = 0; /** * GlobalConfig ScoreExchangeStarLevel. * @member {number} ScoreExchangeStarLevel * @memberof cs.GlobalConfig * @instance */ GlobalConfig.prototype.ScoreExchangeStarLevel = 0; /** * GlobalConfig GameName. * @member {string} GameName * @memberof cs.GlobalConfig * @instance */ GlobalConfig.prototype.GameName = ""; /** * GlobalConfig EmotionBasePrompt. * @member {string} EmotionBasePrompt * @memberof cs.GlobalConfig * @instance */ GlobalConfig.prototype.EmotionBasePrompt = ""; /** * GlobalConfig girlBasePrompt. * @member {string} girlBasePrompt * @memberof cs.GlobalConfig * @instance */ GlobalConfig.prototype.girlBasePrompt = ""; /** * Creates a new GlobalConfig instance using the specified properties. * @function create * @memberof cs.GlobalConfig * @static * @param {cs.IGlobalConfig=} [properties] Properties to set * @returns {cs.GlobalConfig} GlobalConfig instance */ GlobalConfig.create = function create(properties) { return new GlobalConfig(properties); }; /** * Encodes the specified GlobalConfig message. Does not implicitly {@link cs.GlobalConfig.verify|verify} messages. * @function encode * @memberof cs.GlobalConfig * @static * @param {cs.IGlobalConfig} message GlobalConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ GlobalConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.ApiKey != null && Object.hasOwnProperty.call(message, "ApiKey")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.ApiKey); if (message.emotionApiKey != null && Object.hasOwnProperty.call(message, "emotionApiKey")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.emotionApiKey); if (message.Model != null && Object.hasOwnProperty.call(message, "Model")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.Model); if (message.Temperature != null && Object.hasOwnProperty.call(message, "Temperature")) writer.uint32(/* id 4, wireType 5 =*/37).float(message.Temperature); if (message.MaxTokens != null && Object.hasOwnProperty.call(message, "MaxTokens")) writer.uint32(/* id 5, wireType 0 =*/40).int32(message.MaxTokens); if (message.Timeout != null && Object.hasOwnProperty.call(message, "Timeout")) writer.uint32(/* id 6, wireType 0 =*/48).int32(message.Timeout); if (message.FreeChatTimes != null && Object.hasOwnProperty.call(message, "FreeChatTimes")) writer.uint32(/* id 7, wireType 0 =*/56).int32(message.FreeChatTimes); if (message.OnceChatAddScore != null && Object.hasOwnProperty.call(message, "OnceChatAddScore")) writer.uint32(/* id 8, wireType 0 =*/64).int32(message.OnceChatAddScore); if (message.ScoreExchangeStarLevel != null && Object.hasOwnProperty.call(message, "ScoreExchangeStarLevel")) writer.uint32(/* id 9, wireType 0 =*/72).int32(message.ScoreExchangeStarLevel); if (message.GameName != null && Object.hasOwnProperty.call(message, "GameName")) writer.uint32(/* id 10, wireType 2 =*/82).string(message.GameName); if (message.EmotionBasePrompt != null && Object.hasOwnProperty.call(message, "EmotionBasePrompt")) writer.uint32(/* id 11, wireType 2 =*/90).string(message.EmotionBasePrompt); if (message.girlBasePrompt != null && Object.hasOwnProperty.call(message, "girlBasePrompt")) writer.uint32(/* id 12, wireType 2 =*/98).string(message.girlBasePrompt); return writer; }; /** * Encodes the specified GlobalConfig message, length delimited. Does not implicitly {@link cs.GlobalConfig.verify|verify} messages. * @function encodeDelimited * @memberof cs.GlobalConfig * @static * @param {cs.IGlobalConfig} message GlobalConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ GlobalConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a GlobalConfig message from the specified reader or buffer. * @function decode * @memberof cs.GlobalConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {cs.GlobalConfig} GlobalConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ GlobalConfig.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.cs.GlobalConfig(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { message.ApiKey = reader.string(); break; } case 2: { message.emotionApiKey = reader.string(); break; } case 3: { message.Model = reader.string(); break; } case 4: { message.Temperature = reader.float(); break; } case 5: { message.MaxTokens = reader.int32(); break; } case 6: { message.Timeout = reader.int32(); break; } case 7: { message.FreeChatTimes = reader.int32(); break; } case 8: { message.OnceChatAddScore = reader.int32(); break; } case 9: { message.ScoreExchangeStarLevel = reader.int32(); break; } case 10: { message.GameName = reader.string(); break; } case 11: { message.EmotionBasePrompt = reader.string(); break; } case 12: { message.girlBasePrompt = reader.string(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a GlobalConfig message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof cs.GlobalConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {cs.GlobalConfig} GlobalConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ GlobalConfig.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a GlobalConfig message. * @function verify * @memberof cs.GlobalConfig * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ GlobalConfig.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.ApiKey != null && message.hasOwnProperty("ApiKey")) if (!$util.isString(message.ApiKey)) return "ApiKey: string expected"; if (message.emotionApiKey != null && message.hasOwnProperty("emotionApiKey")) if (!$util.isString(message.emotionApiKey)) return "emotionApiKey: string expected"; if (message.Model != null && message.hasOwnProperty("Model")) if (!$util.isString(message.Model)) return "Model: string expected"; if (message.Temperature != null && message.hasOwnProperty("Temperature")) if (typeof message.Temperature !== "number") return "Temperature: number expected"; if (message.MaxTokens != null && message.hasOwnProperty("MaxTokens")) if (!$util.isInteger(message.MaxTokens)) return "MaxTokens: integer expected"; if (message.Timeout != null && message.hasOwnProperty("Timeout")) if (!$util.isInteger(message.Timeout)) return "Timeout: integer expected"; if (message.FreeChatTimes != null && message.hasOwnProperty("FreeChatTimes")) if (!$util.isInteger(message.FreeChatTimes)) return "FreeChatTimes: integer expected"; if (message.OnceChatAddScore != null && message.hasOwnProperty("OnceChatAddScore")) if (!$util.isInteger(message.OnceChatAddScore)) return "OnceChatAddScore: integer expected"; if (message.ScoreExchangeStarLevel != null && message.hasOwnProperty("ScoreExchangeStarLevel")) if (!$util.isInteger(message.ScoreExchangeStarLevel)) return "ScoreExchangeStarLevel: integer expected"; if (message.GameName != null && message.hasOwnProperty("GameName")) if (!$util.isString(message.GameName)) return "GameName: string expected"; if (message.EmotionBasePrompt != null && message.hasOwnProperty("EmotionBasePrompt")) if (!$util.isString(message.EmotionBasePrompt)) return "EmotionBasePrompt: string expected"; if (message.girlBasePrompt != null && message.hasOwnProperty("girlBasePrompt")) if (!$util.isString(message.girlBasePrompt)) return "girlBasePrompt: string expected"; return null; }; /** * Creates a GlobalConfig message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof cs.GlobalConfig * @static * @param {Object.} object Plain object * @returns {cs.GlobalConfig} GlobalConfig */ GlobalConfig.fromObject = function fromObject(object) { if (object instanceof $root.cs.GlobalConfig) return object; var message = new $root.cs.GlobalConfig(); if (object.ApiKey != null) message.ApiKey = String(object.ApiKey); if (object.emotionApiKey != null) message.emotionApiKey = String(object.emotionApiKey); if (object.Model != null) message.Model = String(object.Model); if (object.Temperature != null) message.Temperature = Number(object.Temperature); if (object.MaxTokens != null) message.MaxTokens = object.MaxTokens | 0; if (object.Timeout != null) message.Timeout = object.Timeout | 0; if (object.FreeChatTimes != null) message.FreeChatTimes = object.FreeChatTimes | 0; if (object.OnceChatAddScore != null) message.OnceChatAddScore = object.OnceChatAddScore | 0; if (object.ScoreExchangeStarLevel != null) message.ScoreExchangeStarLevel = object.ScoreExchangeStarLevel | 0; if (object.GameName != null) message.GameName = String(object.GameName); if (object.EmotionBasePrompt != null) message.EmotionBasePrompt = String(object.EmotionBasePrompt); if (object.girlBasePrompt != null) message.girlBasePrompt = String(object.girlBasePrompt); return message; }; /** * Creates a plain object from a GlobalConfig message. Also converts values to other types if specified. * @function toObject * @memberof cs.GlobalConfig * @static * @param {cs.GlobalConfig} message GlobalConfig * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ GlobalConfig.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.ApiKey = ""; object.emotionApiKey = ""; object.Model = ""; object.Temperature = 0; object.MaxTokens = 0; object.Timeout = 0; object.FreeChatTimes = 0; object.OnceChatAddScore = 0; object.ScoreExchangeStarLevel = 0; object.GameName = ""; object.EmotionBasePrompt = ""; object.girlBasePrompt = ""; } if (message.ApiKey != null && message.hasOwnProperty("ApiKey")) object.ApiKey = message.ApiKey; if (message.emotionApiKey != null && message.hasOwnProperty("emotionApiKey")) object.emotionApiKey = message.emotionApiKey; if (message.Model != null && message.hasOwnProperty("Model")) object.Model = message.Model; if (message.Temperature != null && message.hasOwnProperty("Temperature")) object.Temperature = options.json && !isFinite(message.Temperature) ? String(message.Temperature) : message.Temperature; if (message.MaxTokens != null && message.hasOwnProperty("MaxTokens")) object.MaxTokens = message.MaxTokens; if (message.Timeout != null && message.hasOwnProperty("Timeout")) object.Timeout = message.Timeout; if (message.FreeChatTimes != null && message.hasOwnProperty("FreeChatTimes")) object.FreeChatTimes = message.FreeChatTimes; if (message.OnceChatAddScore != null && message.hasOwnProperty("OnceChatAddScore")) object.OnceChatAddScore = message.OnceChatAddScore; if (message.ScoreExchangeStarLevel != null && message.hasOwnProperty("ScoreExchangeStarLevel")) object.ScoreExchangeStarLevel = message.ScoreExchangeStarLevel; if (message.GameName != null && message.hasOwnProperty("GameName")) object.GameName = message.GameName; if (message.EmotionBasePrompt != null && message.hasOwnProperty("EmotionBasePrompt")) object.EmotionBasePrompt = message.EmotionBasePrompt; if (message.girlBasePrompt != null && message.hasOwnProperty("girlBasePrompt")) object.girlBasePrompt = message.girlBasePrompt; return object; }; /** * Converts this GlobalConfig to JSON. * @function toJSON * @memberof cs.GlobalConfig * @instance * @returns {Object.} JSON object */ GlobalConfig.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for GlobalConfig * @function getTypeUrl * @memberof cs.GlobalConfig * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ GlobalConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/cs.GlobalConfig"; }; return GlobalConfig; })(); cs.Language = (function() { /** * Properties of a Language. * @memberof cs * @interface ILanguage * @property {string|null} [key] Language key * @property {string|null} [languageEn] Language languageEn * @property {string|null} [languageCn] Language languageCn * @property {string|null} [languageHi] Language languageHi * @property {string|null} [languageFr] Language languageFr * @property {string|null} [languageDe] Language languageDe */ /** * Constructs a new Language. * @memberof cs * @classdesc Represents a Language. * @implements ILanguage * @constructor * @param {cs.ILanguage=} [properties] Properties to set */ function Language(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]]; } /** * Language key. * @member {string} key * @memberof cs.Language * @instance */ Language.prototype.key = ""; /** * Language languageEn. * @member {string} languageEn * @memberof cs.Language * @instance */ Language.prototype.languageEn = ""; /** * Language languageCn. * @member {string} languageCn * @memberof cs.Language * @instance */ Language.prototype.languageCn = ""; /** * Language languageHi. * @member {string} languageHi * @memberof cs.Language * @instance */ Language.prototype.languageHi = ""; /** * Language languageFr. * @member {string} languageFr * @memberof cs.Language * @instance */ Language.prototype.languageFr = ""; /** * Language languageDe. * @member {string} languageDe * @memberof cs.Language * @instance */ Language.prototype.languageDe = ""; /** * Creates a new Language instance using the specified properties. * @function create * @memberof cs.Language * @static * @param {cs.ILanguage=} [properties] Properties to set * @returns {cs.Language} Language instance */ Language.create = function create(properties) { return new Language(properties); }; /** * Encodes the specified Language message. Does not implicitly {@link cs.Language.verify|verify} messages. * @function encode * @memberof cs.Language * @static * @param {cs.ILanguage} message Language message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ Language.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.key != null && Object.hasOwnProperty.call(message, "key")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.key); if (message.languageEn != null && Object.hasOwnProperty.call(message, "languageEn")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.languageEn); if (message.languageCn != null && Object.hasOwnProperty.call(message, "languageCn")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.languageCn); if (message.languageHi != null && Object.hasOwnProperty.call(message, "languageHi")) writer.uint32(/* id 4, wireType 2 =*/34).string(message.languageHi); if (message.languageFr != null && Object.hasOwnProperty.call(message, "languageFr")) writer.uint32(/* id 5, wireType 2 =*/42).string(message.languageFr); if (message.languageDe != null && Object.hasOwnProperty.call(message, "languageDe")) writer.uint32(/* id 6, wireType 2 =*/50).string(message.languageDe); return writer; }; /** * Encodes the specified Language message, length delimited. Does not implicitly {@link cs.Language.verify|verify} messages. * @function encodeDelimited * @memberof cs.Language * @static * @param {cs.ILanguage} message Language message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ Language.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a Language message from the specified reader or buffer. * @function decode * @memberof cs.Language * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {cs.Language} Language * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ Language.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.cs.Language(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { message.key = reader.string(); break; } case 2: { message.languageEn = reader.string(); break; } case 3: { message.languageCn = reader.string(); break; } case 4: { message.languageHi = reader.string(); break; } case 5: { message.languageFr = reader.string(); break; } case 6: { message.languageDe = reader.string(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a Language message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof cs.Language * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {cs.Language} Language * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ Language.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a Language message. * @function verify * @memberof cs.Language * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ Language.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.key != null && message.hasOwnProperty("key")) if (!$util.isString(message.key)) return "key: string expected"; if (message.languageEn != null && message.hasOwnProperty("languageEn")) if (!$util.isString(message.languageEn)) return "languageEn: string expected"; if (message.languageCn != null && message.hasOwnProperty("languageCn")) if (!$util.isString(message.languageCn)) return "languageCn: string expected"; if (message.languageHi != null && message.hasOwnProperty("languageHi")) if (!$util.isString(message.languageHi)) return "languageHi: string expected"; if (message.languageFr != null && message.hasOwnProperty("languageFr")) if (!$util.isString(message.languageFr)) return "languageFr: string expected"; if (message.languageDe != null && message.hasOwnProperty("languageDe")) if (!$util.isString(message.languageDe)) return "languageDe: string expected"; return null; }; /** * Creates a Language message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof cs.Language * @static * @param {Object.} object Plain object * @returns {cs.Language} Language */ Language.fromObject = function fromObject(object) { if (object instanceof $root.cs.Language) return object; var message = new $root.cs.Language(); if (object.key != null) message.key = String(object.key); if (object.languageEn != null) message.languageEn = String(object.languageEn); if (object.languageCn != null) message.languageCn = String(object.languageCn); if (object.languageHi != null) message.languageHi = String(object.languageHi); if (object.languageFr != null) message.languageFr = String(object.languageFr); if (object.languageDe != null) message.languageDe = String(object.languageDe); return message; }; /** * Creates a plain object from a Language message. Also converts values to other types if specified. * @function toObject * @memberof cs.Language * @static * @param {cs.Language} message Language * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ Language.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.key = ""; object.languageEn = ""; object.languageCn = ""; object.languageHi = ""; object.languageFr = ""; object.languageDe = ""; } if (message.key != null && message.hasOwnProperty("key")) object.key = message.key; if (message.languageEn != null && message.hasOwnProperty("languageEn")) object.languageEn = message.languageEn; if (message.languageCn != null && message.hasOwnProperty("languageCn")) object.languageCn = message.languageCn; if (message.languageHi != null && message.hasOwnProperty("languageHi")) object.languageHi = message.languageHi; if (message.languageFr != null && message.hasOwnProperty("languageFr")) object.languageFr = message.languageFr; if (message.languageDe != null && message.hasOwnProperty("languageDe")) object.languageDe = message.languageDe; return object; }; /** * Converts this Language to JSON. * @function toJSON * @memberof cs.Language * @instance * @returns {Object.} JSON object */ Language.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for Language * @function getTypeUrl * @memberof cs.Language * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ Language.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/cs.Language"; }; return Language; })(); cs.PurchaseCommercialImage = (function() { /** * Properties of a PurchaseCommercialImage. * @memberof cs * @interface IPurchaseCommercialImage * @property {number|null} [id] PurchaseCommercialImage id * @property {number|null} [imageType] PurchaseCommercialImage imageType * @property {number|null} [unlockCounts] PurchaseCommercialImage unlockCounts * @property {number|null} [imagePrice] PurchaseCommercialImage imagePrice * @property {string|null} [path] PurchaseCommercialImage path */ /** * Constructs a new PurchaseCommercialImage. * @memberof cs * @classdesc Represents a PurchaseCommercialImage. * @implements IPurchaseCommercialImage * @constructor * @param {cs.IPurchaseCommercialImage=} [properties] Properties to set */ function PurchaseCommercialImage(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]]; } /** * PurchaseCommercialImage id. * @member {number} id * @memberof cs.PurchaseCommercialImage * @instance */ PurchaseCommercialImage.prototype.id = 0; /** * PurchaseCommercialImage imageType. * @member {number} imageType * @memberof cs.PurchaseCommercialImage * @instance */ PurchaseCommercialImage.prototype.imageType = 0; /** * PurchaseCommercialImage unlockCounts. * @member {number} unlockCounts * @memberof cs.PurchaseCommercialImage * @instance */ PurchaseCommercialImage.prototype.unlockCounts = 0; /** * PurchaseCommercialImage imagePrice. * @member {number} imagePrice * @memberof cs.PurchaseCommercialImage * @instance */ PurchaseCommercialImage.prototype.imagePrice = 0; /** * PurchaseCommercialImage path. * @member {string} path * @memberof cs.PurchaseCommercialImage * @instance */ PurchaseCommercialImage.prototype.path = ""; /** * Creates a new PurchaseCommercialImage instance using the specified properties. * @function create * @memberof cs.PurchaseCommercialImage * @static * @param {cs.IPurchaseCommercialImage=} [properties] Properties to set * @returns {cs.PurchaseCommercialImage} PurchaseCommercialImage instance */ PurchaseCommercialImage.create = function create(properties) { return new PurchaseCommercialImage(properties); }; /** * Encodes the specified PurchaseCommercialImage message. Does not implicitly {@link cs.PurchaseCommercialImage.verify|verify} messages. * @function encode * @memberof cs.PurchaseCommercialImage * @static * @param {cs.IPurchaseCommercialImage} message PurchaseCommercialImage message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ PurchaseCommercialImage.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.id != null && Object.hasOwnProperty.call(message, "id")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.id); if (message.imageType != null && Object.hasOwnProperty.call(message, "imageType")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.imageType); if (message.unlockCounts != null && Object.hasOwnProperty.call(message, "unlockCounts")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.unlockCounts); if (message.imagePrice != null && Object.hasOwnProperty.call(message, "imagePrice")) writer.uint32(/* id 4, wireType 0 =*/32).int32(message.imagePrice); if (message.path != null && Object.hasOwnProperty.call(message, "path")) writer.uint32(/* id 5, wireType 2 =*/42).string(message.path); return writer; }; /** * Encodes the specified PurchaseCommercialImage message, length delimited. Does not implicitly {@link cs.PurchaseCommercialImage.verify|verify} messages. * @function encodeDelimited * @memberof cs.PurchaseCommercialImage * @static * @param {cs.IPurchaseCommercialImage} message PurchaseCommercialImage message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ PurchaseCommercialImage.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a PurchaseCommercialImage message from the specified reader or buffer. * @function decode * @memberof cs.PurchaseCommercialImage * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {cs.PurchaseCommercialImage} PurchaseCommercialImage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ PurchaseCommercialImage.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.cs.PurchaseCommercialImage(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { message.id = reader.int32(); break; } case 2: { message.imageType = reader.int32(); break; } case 3: { message.unlockCounts = reader.int32(); break; } case 4: { message.imagePrice = reader.int32(); break; } case 5: { message.path = reader.string(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a PurchaseCommercialImage message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof cs.PurchaseCommercialImage * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {cs.PurchaseCommercialImage} PurchaseCommercialImage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ PurchaseCommercialImage.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a PurchaseCommercialImage message. * @function verify * @memberof cs.PurchaseCommercialImage * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ PurchaseCommercialImage.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.id != null && message.hasOwnProperty("id")) if (!$util.isInteger(message.id)) return "id: integer expected"; if (message.imageType != null && message.hasOwnProperty("imageType")) if (!$util.isInteger(message.imageType)) return "imageType: integer expected"; if (message.unlockCounts != null && message.hasOwnProperty("unlockCounts")) if (!$util.isInteger(message.unlockCounts)) return "unlockCounts: integer expected"; if (message.imagePrice != null && message.hasOwnProperty("imagePrice")) if (!$util.isInteger(message.imagePrice)) return "imagePrice: integer expected"; if (message.path != null && message.hasOwnProperty("path")) if (!$util.isString(message.path)) return "path: string expected"; return null; }; /** * Creates a PurchaseCommercialImage message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof cs.PurchaseCommercialImage * @static * @param {Object.} object Plain object * @returns {cs.PurchaseCommercialImage} PurchaseCommercialImage */ PurchaseCommercialImage.fromObject = function fromObject(object) { if (object instanceof $root.cs.PurchaseCommercialImage) return object; var message = new $root.cs.PurchaseCommercialImage(); if (object.id != null) message.id = object.id | 0; if (object.imageType != null) message.imageType = object.imageType | 0; if (object.unlockCounts != null) message.unlockCounts = object.unlockCounts | 0; if (object.imagePrice != null) message.imagePrice = object.imagePrice | 0; if (object.path != null) message.path = String(object.path); return message; }; /** * Creates a plain object from a PurchaseCommercialImage message. Also converts values to other types if specified. * @function toObject * @memberof cs.PurchaseCommercialImage * @static * @param {cs.PurchaseCommercialImage} message PurchaseCommercialImage * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ PurchaseCommercialImage.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.id = 0; object.imageType = 0; object.unlockCounts = 0; object.imagePrice = 0; object.path = ""; } if (message.id != null && message.hasOwnProperty("id")) object.id = message.id; if (message.imageType != null && message.hasOwnProperty("imageType")) object.imageType = message.imageType; if (message.unlockCounts != null && message.hasOwnProperty("unlockCounts")) object.unlockCounts = message.unlockCounts; if (message.imagePrice != null && message.hasOwnProperty("imagePrice")) object.imagePrice = message.imagePrice; if (message.path != null && message.hasOwnProperty("path")) object.path = message.path; return object; }; /** * Converts this PurchaseCommercialImage to JSON. * @function toJSON * @memberof cs.PurchaseCommercialImage * @instance * @returns {Object.} JSON object */ PurchaseCommercialImage.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for PurchaseCommercialImage * @function getTypeUrl * @memberof cs.PurchaseCommercialImage * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ PurchaseCommercialImage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/cs.PurchaseCommercialImage"; }; return PurchaseCommercialImage; })(); cs.PurchaseCommercialVideo = (function() { /** * Properties of a PurchaseCommercialVideo. * @memberof cs * @interface IPurchaseCommercialVideo * @property {number|null} [id] PurchaseCommercialVideo id * @property {string|null} [path] PurchaseCommercialVideo path * @property {cs.VideoEmotion|null} [emotion] PurchaseCommercialVideo emotion * @property {number|null} [videoPrice] PurchaseCommercialVideo videoPrice */ /** * Constructs a new PurchaseCommercialVideo. * @memberof cs * @classdesc Represents a PurchaseCommercialVideo. * @implements IPurchaseCommercialVideo * @constructor * @param {cs.IPurchaseCommercialVideo=} [properties] Properties to set */ function PurchaseCommercialVideo(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]]; } /** * PurchaseCommercialVideo id. * @member {number} id * @memberof cs.PurchaseCommercialVideo * @instance */ PurchaseCommercialVideo.prototype.id = 0; /** * PurchaseCommercialVideo path. * @member {string} path * @memberof cs.PurchaseCommercialVideo * @instance */ PurchaseCommercialVideo.prototype.path = ""; /** * PurchaseCommercialVideo emotion. * @member {cs.VideoEmotion} emotion * @memberof cs.PurchaseCommercialVideo * @instance */ PurchaseCommercialVideo.prototype.emotion = 0; /** * PurchaseCommercialVideo videoPrice. * @member {number} videoPrice * @memberof cs.PurchaseCommercialVideo * @instance */ PurchaseCommercialVideo.prototype.videoPrice = 0; /** * Creates a new PurchaseCommercialVideo instance using the specified properties. * @function create * @memberof cs.PurchaseCommercialVideo * @static * @param {cs.IPurchaseCommercialVideo=} [properties] Properties to set * @returns {cs.PurchaseCommercialVideo} PurchaseCommercialVideo instance */ PurchaseCommercialVideo.create = function create(properties) { return new PurchaseCommercialVideo(properties); }; /** * Encodes the specified PurchaseCommercialVideo message. Does not implicitly {@link cs.PurchaseCommercialVideo.verify|verify} messages. * @function encode * @memberof cs.PurchaseCommercialVideo * @static * @param {cs.IPurchaseCommercialVideo} message PurchaseCommercialVideo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ PurchaseCommercialVideo.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.id != null && Object.hasOwnProperty.call(message, "id")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.id); if (message.path != null && Object.hasOwnProperty.call(message, "path")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); if (message.emotion != null && Object.hasOwnProperty.call(message, "emotion")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.emotion); if (message.videoPrice != null && Object.hasOwnProperty.call(message, "videoPrice")) writer.uint32(/* id 4, wireType 0 =*/32).int32(message.videoPrice); return writer; }; /** * Encodes the specified PurchaseCommercialVideo message, length delimited. Does not implicitly {@link cs.PurchaseCommercialVideo.verify|verify} messages. * @function encodeDelimited * @memberof cs.PurchaseCommercialVideo * @static * @param {cs.IPurchaseCommercialVideo} message PurchaseCommercialVideo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ PurchaseCommercialVideo.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a PurchaseCommercialVideo message from the specified reader or buffer. * @function decode * @memberof cs.PurchaseCommercialVideo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {cs.PurchaseCommercialVideo} PurchaseCommercialVideo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ PurchaseCommercialVideo.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.cs.PurchaseCommercialVideo(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { message.id = reader.int32(); break; } case 2: { message.path = reader.string(); break; } case 3: { message.emotion = reader.int32(); break; } case 4: { message.videoPrice = reader.int32(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a PurchaseCommercialVideo message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof cs.PurchaseCommercialVideo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {cs.PurchaseCommercialVideo} PurchaseCommercialVideo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ PurchaseCommercialVideo.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a PurchaseCommercialVideo message. * @function verify * @memberof cs.PurchaseCommercialVideo * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ PurchaseCommercialVideo.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.id != null && message.hasOwnProperty("id")) if (!$util.isInteger(message.id)) return "id: integer expected"; if (message.path != null && message.hasOwnProperty("path")) if (!$util.isString(message.path)) return "path: string expected"; if (message.emotion != null && message.hasOwnProperty("emotion")) switch (message.emotion) { default: return "emotion: enum value expected"; case 0: case 1: case 2: case 3: case 4: break; } if (message.videoPrice != null && message.hasOwnProperty("videoPrice")) if (!$util.isInteger(message.videoPrice)) return "videoPrice: integer expected"; return null; }; /** * Creates a PurchaseCommercialVideo message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof cs.PurchaseCommercialVideo * @static * @param {Object.} object Plain object * @returns {cs.PurchaseCommercialVideo} PurchaseCommercialVideo */ PurchaseCommercialVideo.fromObject = function fromObject(object) { if (object instanceof $root.cs.PurchaseCommercialVideo) return object; var message = new $root.cs.PurchaseCommercialVideo(); if (object.id != null) message.id = object.id | 0; if (object.path != null) message.path = String(object.path); switch (object.emotion) { default: if (typeof object.emotion === "number") { message.emotion = object.emotion; break; } break; case "VideoEmotion_calm_down": case 0: message.emotion = 0; break; case "VideoEmotion_arousal": case 1: message.emotion = 1; break; case "VideoEmotion_desire": case 2: message.emotion = 2; break; case "VideoEmotion_passion": case 3: message.emotion = 3; break; case "VideoEmotion_orgasm": case 4: message.emotion = 4; break; } if (object.videoPrice != null) message.videoPrice = object.videoPrice | 0; return message; }; /** * Creates a plain object from a PurchaseCommercialVideo message. Also converts values to other types if specified. * @function toObject * @memberof cs.PurchaseCommercialVideo * @static * @param {cs.PurchaseCommercialVideo} message PurchaseCommercialVideo * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ PurchaseCommercialVideo.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.id = 0; object.path = ""; object.emotion = options.enums === String ? "VideoEmotion_calm_down" : 0; object.videoPrice = 0; } if (message.id != null && message.hasOwnProperty("id")) object.id = message.id; if (message.path != null && message.hasOwnProperty("path")) object.path = message.path; if (message.emotion != null && message.hasOwnProperty("emotion")) object.emotion = options.enums === String ? $root.cs.VideoEmotion[message.emotion] === undefined ? message.emotion : $root.cs.VideoEmotion[message.emotion] : message.emotion; if (message.videoPrice != null && message.hasOwnProperty("videoPrice")) object.videoPrice = message.videoPrice; return object; }; /** * Converts this PurchaseCommercialVideo to JSON. * @function toJSON * @memberof cs.PurchaseCommercialVideo * @instance * @returns {Object.} JSON object */ PurchaseCommercialVideo.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for PurchaseCommercialVideo * @function getTypeUrl * @memberof cs.PurchaseCommercialVideo * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ PurchaseCommercialVideo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/cs.PurchaseCommercialVideo"; }; return PurchaseCommercialVideo; })(); cs.PurchaseConfig = (function() { /** * Properties of a PurchaseConfig. * @memberof cs * @interface IPurchaseConfig * @property {number|null} [id] PurchaseConfig id * @property {string|null} [name] PurchaseConfig name * @property {number|null} [count] PurchaseConfig count * @property {number|null} [price] PurchaseConfig price */ /** * Constructs a new PurchaseConfig. * @memberof cs * @classdesc Represents a PurchaseConfig. * @implements IPurchaseConfig * @constructor * @param {cs.IPurchaseConfig=} [properties] Properties to set */ function PurchaseConfig(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]]; } /** * PurchaseConfig id. * @member {number} id * @memberof cs.PurchaseConfig * @instance */ PurchaseConfig.prototype.id = 0; /** * PurchaseConfig name. * @member {string} name * @memberof cs.PurchaseConfig * @instance */ PurchaseConfig.prototype.name = ""; /** * PurchaseConfig count. * @member {number} count * @memberof cs.PurchaseConfig * @instance */ PurchaseConfig.prototype.count = 0; /** * PurchaseConfig price. * @member {number} price * @memberof cs.PurchaseConfig * @instance */ PurchaseConfig.prototype.price = 0; /** * Creates a new PurchaseConfig instance using the specified properties. * @function create * @memberof cs.PurchaseConfig * @static * @param {cs.IPurchaseConfig=} [properties] Properties to set * @returns {cs.PurchaseConfig} PurchaseConfig instance */ PurchaseConfig.create = function create(properties) { return new PurchaseConfig(properties); }; /** * Encodes the specified PurchaseConfig message. Does not implicitly {@link cs.PurchaseConfig.verify|verify} messages. * @function encode * @memberof cs.PurchaseConfig * @static * @param {cs.IPurchaseConfig} message PurchaseConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ PurchaseConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.id != null && Object.hasOwnProperty.call(message, "id")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.id); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.name); if (message.count != null && Object.hasOwnProperty.call(message, "count")) writer.uint32(/* id 3, wireType 0 =*/24).int32(message.count); if (message.price != null && Object.hasOwnProperty.call(message, "price")) writer.uint32(/* id 4, wireType 0 =*/32).int32(message.price); return writer; }; /** * Encodes the specified PurchaseConfig message, length delimited. Does not implicitly {@link cs.PurchaseConfig.verify|verify} messages. * @function encodeDelimited * @memberof cs.PurchaseConfig * @static * @param {cs.IPurchaseConfig} message PurchaseConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ PurchaseConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a PurchaseConfig message from the specified reader or buffer. * @function decode * @memberof cs.PurchaseConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {cs.PurchaseConfig} PurchaseConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ PurchaseConfig.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.cs.PurchaseConfig(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { message.id = reader.int32(); break; } case 2: { message.name = reader.string(); break; } case 3: { message.count = reader.int32(); break; } case 4: { message.price = reader.int32(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a PurchaseConfig message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof cs.PurchaseConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {cs.PurchaseConfig} PurchaseConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ PurchaseConfig.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a PurchaseConfig message. * @function verify * @memberof cs.PurchaseConfig * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ PurchaseConfig.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.id != null && message.hasOwnProperty("id")) if (!$util.isInteger(message.id)) return "id: integer expected"; if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; if (message.count != null && message.hasOwnProperty("count")) if (!$util.isInteger(message.count)) return "count: integer expected"; if (message.price != null && message.hasOwnProperty("price")) if (!$util.isInteger(message.price)) return "price: integer expected"; return null; }; /** * Creates a PurchaseConfig message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof cs.PurchaseConfig * @static * @param {Object.} object Plain object * @returns {cs.PurchaseConfig} PurchaseConfig */ PurchaseConfig.fromObject = function fromObject(object) { if (object instanceof $root.cs.PurchaseConfig) return object; var message = new $root.cs.PurchaseConfig(); if (object.id != null) message.id = object.id | 0; if (object.name != null) message.name = String(object.name); if (object.count != null) message.count = object.count | 0; if (object.price != null) message.price = object.price | 0; return message; }; /** * Creates a plain object from a PurchaseConfig message. Also converts values to other types if specified. * @function toObject * @memberof cs.PurchaseConfig * @static * @param {cs.PurchaseConfig} message PurchaseConfig * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ PurchaseConfig.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.id = 0; object.name = ""; object.count = 0; object.price = 0; } if (message.id != null && message.hasOwnProperty("id")) object.id = message.id; if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; if (message.count != null && message.hasOwnProperty("count")) object.count = message.count; if (message.price != null && message.hasOwnProperty("price")) object.price = message.price; return object; }; /** * Converts this PurchaseConfig to JSON. * @function toJSON * @memberof cs.PurchaseConfig * @instance * @returns {Object.} JSON object */ PurchaseConfig.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for PurchaseConfig * @function getTypeUrl * @memberof cs.PurchaseConfig * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ PurchaseConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/cs.PurchaseConfig"; }; return PurchaseConfig; })(); cs.Themes = (function() { /** * Properties of a Themes. * @memberof cs * @interface IThemes * @property {number|null} [id] Themes id * @property {string|null} [key] Themes key * @property {string|null} [name] Themes name * @property {cs.Category|null} [category] Themes category * @property {boolean|null} [isRelease] Themes isRelease * @property {string|null} [path] Themes path */ /** * Constructs a new Themes. * @memberof cs * @classdesc Represents a Themes. * @implements IThemes * @constructor * @param {cs.IThemes=} [properties] Properties to set */ function Themes(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]]; } /** * Themes id. * @member {number} id * @memberof cs.Themes * @instance */ Themes.prototype.id = 0; /** * Themes key. * @member {string} key * @memberof cs.Themes * @instance */ Themes.prototype.key = ""; /** * Themes name. * @member {string} name * @memberof cs.Themes * @instance */ Themes.prototype.name = ""; /** * Themes category. * @member {cs.Category} category * @memberof cs.Themes * @instance */ Themes.prototype.category = 0; /** * Themes isRelease. * @member {boolean} isRelease * @memberof cs.Themes * @instance */ Themes.prototype.isRelease = false; /** * Themes path. * @member {string} path * @memberof cs.Themes * @instance */ Themes.prototype.path = ""; /** * Creates a new Themes instance using the specified properties. * @function create * @memberof cs.Themes * @static * @param {cs.IThemes=} [properties] Properties to set * @returns {cs.Themes} Themes instance */ Themes.create = function create(properties) { return new Themes(properties); }; /** * Encodes the specified Themes message. Does not implicitly {@link cs.Themes.verify|verify} messages. * @function encode * @memberof cs.Themes * @static * @param {cs.IThemes} message Themes message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ Themes.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.id != null && Object.hasOwnProperty.call(message, "id")) writer.uint32(/* id 1, wireType 0 =*/8).int32(message.id); if (message.key != null && Object.hasOwnProperty.call(message, "key")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.key); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); if (message.category != null && Object.hasOwnProperty.call(message, "category")) writer.uint32(/* id 4, wireType 0 =*/32).int32(message.category); if (message.isRelease != null && Object.hasOwnProperty.call(message, "isRelease")) writer.uint32(/* id 5, wireType 0 =*/40).bool(message.isRelease); if (message.path != null && Object.hasOwnProperty.call(message, "path")) writer.uint32(/* id 6, wireType 2 =*/50).string(message.path); return writer; }; /** * Encodes the specified Themes message, length delimited. Does not implicitly {@link cs.Themes.verify|verify} messages. * @function encodeDelimited * @memberof cs.Themes * @static * @param {cs.IThemes} message Themes message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ Themes.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a Themes message from the specified reader or buffer. * @function decode * @memberof cs.Themes * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {cs.Themes} Themes * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ Themes.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.cs.Themes(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { message.id = reader.int32(); break; } case 2: { message.key = reader.string(); break; } case 3: { message.name = reader.string(); break; } case 4: { message.category = reader.int32(); break; } case 5: { message.isRelease = reader.bool(); break; } case 6: { message.path = reader.string(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a Themes message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof cs.Themes * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {cs.Themes} Themes * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ Themes.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a Themes message. * @function verify * @memberof cs.Themes * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ Themes.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.id != null && message.hasOwnProperty("id")) if (!$util.isInteger(message.id)) return "id: integer expected"; if (message.key != null && message.hasOwnProperty("key")) if (!$util.isString(message.key)) return "key: string expected"; if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; if (message.category != null && message.hasOwnProperty("category")) switch (message.category) { default: return "category: enum value expected"; case 0: case 1: case 2: case 3: case 4: case 5: case 6: break; } if (message.isRelease != null && message.hasOwnProperty("isRelease")) if (typeof message.isRelease !== "boolean") return "isRelease: boolean expected"; if (message.path != null && message.hasOwnProperty("path")) if (!$util.isString(message.path)) return "path: string expected"; return null; }; /** * Creates a Themes message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof cs.Themes * @static * @param {Object.} object Plain object * @returns {cs.Themes} Themes */ Themes.fromObject = function fromObject(object) { if (object instanceof $root.cs.Themes) return object; var message = new $root.cs.Themes(); if (object.id != null) message.id = object.id | 0; if (object.key != null) message.key = String(object.key); if (object.name != null) message.name = String(object.name); switch (object.category) { default: if (typeof object.category === "number") { message.category = object.category; break; } break; case "Category_mature": case 0: message.category = 0; break; case "Category_eighteen": case 1: message.category = 1; break; case "Category_qinfan": case 2: message.category = 2; break; case "Category_luanlun": case 3: message.category = 3; break; case "Category_bdsm": case 4: message.category = 4; break; case "Category_loli": case 5: message.category = 5; break; case "Category_upcomming": case 6: message.category = 6; break; } if (object.isRelease != null) message.isRelease = Boolean(object.isRelease); if (object.path != null) message.path = String(object.path); return message; }; /** * Creates a plain object from a Themes message. Also converts values to other types if specified. * @function toObject * @memberof cs.Themes * @static * @param {cs.Themes} message Themes * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ Themes.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.id = 0; object.key = ""; object.name = ""; object.category = options.enums === String ? "Category_mature" : 0; object.isRelease = false; object.path = ""; } if (message.id != null && message.hasOwnProperty("id")) object.id = message.id; if (message.key != null && message.hasOwnProperty("key")) object.key = message.key; if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; if (message.category != null && message.hasOwnProperty("category")) object.category = options.enums === String ? $root.cs.Category[message.category] === undefined ? message.category : $root.cs.Category[message.category] : message.category; if (message.isRelease != null && message.hasOwnProperty("isRelease")) object.isRelease = message.isRelease; if (message.path != null && message.hasOwnProperty("path")) object.path = message.path; return object; }; /** * Converts this Themes to JSON. * @function toJSON * @memberof cs.Themes * @instance * @returns {Object.} JSON object */ Themes.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for Themes * @function getTypeUrl * @memberof cs.Themes * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ Themes.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/cs.Themes"; }; return Themes; })(); cs.vector2 = (function() { /** * Properties of a vector2. * @memberof cs * @interface Ivector2 * @property {number|null} [x] vector2 x * @property {number|null} [y] vector2 y */ /** * Constructs a new vector2. * @memberof cs * @classdesc Represents a vector2. * @implements Ivector2 * @constructor * @param {cs.Ivector2=} [properties] Properties to set */ function vector2(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]]; } /** * vector2 x. * @member {number} x * @memberof cs.vector2 * @instance */ vector2.prototype.x = 0; /** * vector2 y. * @member {number} y * @memberof cs.vector2 * @instance */ vector2.prototype.y = 0; /** * Creates a new vector2 instance using the specified properties. * @function create * @memberof cs.vector2 * @static * @param {cs.Ivector2=} [properties] Properties to set * @returns {cs.vector2} vector2 instance */ vector2.create = function create(properties) { return new vector2(properties); }; /** * Encodes the specified vector2 message. Does not implicitly {@link cs.vector2.verify|verify} messages. * @function encode * @memberof cs.vector2 * @static * @param {cs.Ivector2} message vector2 message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ vector2.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.x != null && Object.hasOwnProperty.call(message, "x")) writer.uint32(/* id 1, wireType 5 =*/13).float(message.x); if (message.y != null && Object.hasOwnProperty.call(message, "y")) writer.uint32(/* id 2, wireType 5 =*/21).float(message.y); return writer; }; /** * Encodes the specified vector2 message, length delimited. Does not implicitly {@link cs.vector2.verify|verify} messages. * @function encodeDelimited * @memberof cs.vector2 * @static * @param {cs.Ivector2} message vector2 message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ vector2.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a vector2 message from the specified reader or buffer. * @function decode * @memberof cs.vector2 * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {cs.vector2} vector2 * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ vector2.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.cs.vector2(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { message.x = reader.float(); break; } case 2: { message.y = reader.float(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a vector2 message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof cs.vector2 * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {cs.vector2} vector2 * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ vector2.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a vector2 message. * @function verify * @memberof cs.vector2 * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ vector2.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.x != null && message.hasOwnProperty("x")) if (typeof message.x !== "number") return "x: number expected"; if (message.y != null && message.hasOwnProperty("y")) if (typeof message.y !== "number") return "y: number expected"; return null; }; /** * Creates a vector2 message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof cs.vector2 * @static * @param {Object.} object Plain object * @returns {cs.vector2} vector2 */ vector2.fromObject = function fromObject(object) { if (object instanceof $root.cs.vector2) return object; var message = new $root.cs.vector2(); if (object.x != null) message.x = Number(object.x); if (object.y != null) message.y = Number(object.y); return message; }; /** * Creates a plain object from a vector2 message. Also converts values to other types if specified. * @function toObject * @memberof cs.vector2 * @static * @param {cs.vector2} message vector2 * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ vector2.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.x = 0; object.y = 0; } if (message.x != null && message.hasOwnProperty("x")) object.x = options.json && !isFinite(message.x) ? String(message.x) : message.x; if (message.y != null && message.hasOwnProperty("y")) object.y = options.json && !isFinite(message.y) ? String(message.y) : message.y; return object; }; /** * Converts this vector2 to JSON. * @function toJSON * @memberof cs.vector2 * @instance * @returns {Object.} JSON object */ vector2.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for vector2 * @function getTypeUrl * @memberof cs.vector2 * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ vector2.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/cs.vector2"; }; return vector2; })(); cs.vector3 = (function() { /** * Properties of a vector3. * @memberof cs * @interface Ivector3 * @property {number|null} [x] vector3 x * @property {number|null} [y] vector3 y * @property {number|null} [z] vector3 z */ /** * Constructs a new vector3. * @memberof cs * @classdesc Represents a vector3. * @implements Ivector3 * @constructor * @param {cs.Ivector3=} [properties] Properties to set */ function vector3(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]]; } /** * vector3 x. * @member {number} x * @memberof cs.vector3 * @instance */ vector3.prototype.x = 0; /** * vector3 y. * @member {number} y * @memberof cs.vector3 * @instance */ vector3.prototype.y = 0; /** * vector3 z. * @member {number} z * @memberof cs.vector3 * @instance */ vector3.prototype.z = 0; /** * Creates a new vector3 instance using the specified properties. * @function create * @memberof cs.vector3 * @static * @param {cs.Ivector3=} [properties] Properties to set * @returns {cs.vector3} vector3 instance */ vector3.create = function create(properties) { return new vector3(properties); }; /** * Encodes the specified vector3 message. Does not implicitly {@link cs.vector3.verify|verify} messages. * @function encode * @memberof cs.vector3 * @static * @param {cs.Ivector3} message vector3 message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ vector3.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.x != null && Object.hasOwnProperty.call(message, "x")) writer.uint32(/* id 1, wireType 5 =*/13).float(message.x); if (message.y != null && Object.hasOwnProperty.call(message, "y")) writer.uint32(/* id 2, wireType 5 =*/21).float(message.y); if (message.z != null && Object.hasOwnProperty.call(message, "z")) writer.uint32(/* id 3, wireType 5 =*/29).float(message.z); return writer; }; /** * Encodes the specified vector3 message, length delimited. Does not implicitly {@link cs.vector3.verify|verify} messages. * @function encodeDelimited * @memberof cs.vector3 * @static * @param {cs.Ivector3} message vector3 message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ vector3.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a vector3 message from the specified reader or buffer. * @function decode * @memberof cs.vector3 * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {cs.vector3} vector3 * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ vector3.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.cs.vector3(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { message.x = reader.float(); break; } case 2: { message.y = reader.float(); break; } case 3: { message.z = reader.float(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a vector3 message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof cs.vector3 * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {cs.vector3} vector3 * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ vector3.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a vector3 message. * @function verify * @memberof cs.vector3 * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ vector3.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.x != null && message.hasOwnProperty("x")) if (typeof message.x !== "number") return "x: number expected"; if (message.y != null && message.hasOwnProperty("y")) if (typeof message.y !== "number") return "y: number expected"; if (message.z != null && message.hasOwnProperty("z")) if (typeof message.z !== "number") return "z: number expected"; return null; }; /** * Creates a vector3 message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof cs.vector3 * @static * @param {Object.} object Plain object * @returns {cs.vector3} vector3 */ vector3.fromObject = function fromObject(object) { if (object instanceof $root.cs.vector3) return object; var message = new $root.cs.vector3(); if (object.x != null) message.x = Number(object.x); if (object.y != null) message.y = Number(object.y); if (object.z != null) message.z = Number(object.z); return message; }; /** * Creates a plain object from a vector3 message. Also converts values to other types if specified. * @function toObject * @memberof cs.vector3 * @static * @param {cs.vector3} message vector3 * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ vector3.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.x = 0; object.y = 0; object.z = 0; } if (message.x != null && message.hasOwnProperty("x")) object.x = options.json && !isFinite(message.x) ? String(message.x) : message.x; if (message.y != null && message.hasOwnProperty("y")) object.y = options.json && !isFinite(message.y) ? String(message.y) : message.y; if (message.z != null && message.hasOwnProperty("z")) object.z = options.json && !isFinite(message.z) ? String(message.z) : message.z; return object; }; /** * Converts this vector3 to JSON. * @function toJSON * @memberof cs.vector3 * @instance * @returns {Object.} JSON object */ vector3.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for vector3 * @function getTypeUrl * @memberof cs.vector3 * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ vector3.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/cs.vector3"; }; return vector3; })(); cs.vector4 = (function() { /** * Properties of a vector4. * @memberof cs * @interface Ivector4 * @property {number|null} [x] vector4 x * @property {number|null} [y] vector4 y * @property {number|null} [z] vector4 z * @property {number|null} [w] vector4 w */ /** * Constructs a new vector4. * @memberof cs * @classdesc Represents a vector4. * @implements Ivector4 * @constructor * @param {cs.Ivector4=} [properties] Properties to set */ function vector4(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]]; } /** * vector4 x. * @member {number} x * @memberof cs.vector4 * @instance */ vector4.prototype.x = 0; /** * vector4 y. * @member {number} y * @memberof cs.vector4 * @instance */ vector4.prototype.y = 0; /** * vector4 z. * @member {number} z * @memberof cs.vector4 * @instance */ vector4.prototype.z = 0; /** * vector4 w. * @member {number} w * @memberof cs.vector4 * @instance */ vector4.prototype.w = 0; /** * Creates a new vector4 instance using the specified properties. * @function create * @memberof cs.vector4 * @static * @param {cs.Ivector4=} [properties] Properties to set * @returns {cs.vector4} vector4 instance */ vector4.create = function create(properties) { return new vector4(properties); }; /** * Encodes the specified vector4 message. Does not implicitly {@link cs.vector4.verify|verify} messages. * @function encode * @memberof cs.vector4 * @static * @param {cs.Ivector4} message vector4 message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ vector4.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.x != null && Object.hasOwnProperty.call(message, "x")) writer.uint32(/* id 1, wireType 5 =*/13).float(message.x); if (message.y != null && Object.hasOwnProperty.call(message, "y")) writer.uint32(/* id 2, wireType 5 =*/21).float(message.y); if (message.z != null && Object.hasOwnProperty.call(message, "z")) writer.uint32(/* id 3, wireType 5 =*/29).float(message.z); if (message.w != null && Object.hasOwnProperty.call(message, "w")) writer.uint32(/* id 4, wireType 5 =*/37).float(message.w); return writer; }; /** * Encodes the specified vector4 message, length delimited. Does not implicitly {@link cs.vector4.verify|verify} messages. * @function encodeDelimited * @memberof cs.vector4 * @static * @param {cs.Ivector4} message vector4 message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ vector4.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a vector4 message from the specified reader or buffer. * @function decode * @memberof cs.vector4 * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {cs.vector4} vector4 * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ vector4.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.cs.vector4(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { message.x = reader.float(); break; } case 2: { message.y = reader.float(); break; } case 3: { message.z = reader.float(); break; } case 4: { message.w = reader.float(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a vector4 message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof cs.vector4 * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {cs.vector4} vector4 * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ vector4.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a vector4 message. * @function verify * @memberof cs.vector4 * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ vector4.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.x != null && message.hasOwnProperty("x")) if (typeof message.x !== "number") return "x: number expected"; if (message.y != null && message.hasOwnProperty("y")) if (typeof message.y !== "number") return "y: number expected"; if (message.z != null && message.hasOwnProperty("z")) if (typeof message.z !== "number") return "z: number expected"; if (message.w != null && message.hasOwnProperty("w")) if (typeof message.w !== "number") return "w: number expected"; return null; }; /** * Creates a vector4 message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof cs.vector4 * @static * @param {Object.} object Plain object * @returns {cs.vector4} vector4 */ vector4.fromObject = function fromObject(object) { if (object instanceof $root.cs.vector4) return object; var message = new $root.cs.vector4(); if (object.x != null) message.x = Number(object.x); if (object.y != null) message.y = Number(object.y); if (object.z != null) message.z = Number(object.z); if (object.w != null) message.w = Number(object.w); return message; }; /** * Creates a plain object from a vector4 message. Also converts values to other types if specified. * @function toObject * @memberof cs.vector4 * @static * @param {cs.vector4} message vector4 * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ vector4.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.x = 0; object.y = 0; object.z = 0; object.w = 0; } if (message.x != null && message.hasOwnProperty("x")) object.x = options.json && !isFinite(message.x) ? String(message.x) : message.x; if (message.y != null && message.hasOwnProperty("y")) object.y = options.json && !isFinite(message.y) ? String(message.y) : message.y; if (message.z != null && message.hasOwnProperty("z")) object.z = options.json && !isFinite(message.z) ? String(message.z) : message.z; if (message.w != null && message.hasOwnProperty("w")) object.w = options.json && !isFinite(message.w) ? String(message.w) : message.w; return object; }; /** * Converts this vector4 to JSON. * @function toJSON * @memberof cs.vector4 * @instance * @returns {Object.} JSON object */ vector4.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for vector4 * @function getTypeUrl * @memberof cs.vector4 * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ vector4.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/cs.vector4"; }; return vector4; })(); cs.TbLanguage = (function() { /** * Properties of a TbLanguage. * @memberof cs * @interface ITbLanguage * @property {Array.|null} [items] TbLanguage items */ /** * Constructs a new TbLanguage. * @memberof cs * @classdesc Represents a TbLanguage. * @implements ITbLanguage * @constructor * @param {cs.ITbLanguage=} [properties] Properties to set */ function TbLanguage(properties) { this.items = []; 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]]; } /** * TbLanguage items. * @member {Array.} items * @memberof cs.TbLanguage * @instance */ TbLanguage.prototype.items = $util.emptyArray; /** * Creates a new TbLanguage instance using the specified properties. * @function create * @memberof cs.TbLanguage * @static * @param {cs.ITbLanguage=} [properties] Properties to set * @returns {cs.TbLanguage} TbLanguage instance */ TbLanguage.create = function create(properties) { return new TbLanguage(properties); }; /** * Encodes the specified TbLanguage message. Does not implicitly {@link cs.TbLanguage.verify|verify} messages. * @function encode * @memberof cs.TbLanguage * @static * @param {cs.ITbLanguage} message TbLanguage message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ TbLanguage.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.items != null && message.items.length) for (var i = 0; i < message.items.length; ++i) $root.cs.Language.encode(message.items[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** * Encodes the specified TbLanguage message, length delimited. Does not implicitly {@link cs.TbLanguage.verify|verify} messages. * @function encodeDelimited * @memberof cs.TbLanguage * @static * @param {cs.ITbLanguage} message TbLanguage message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ TbLanguage.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a TbLanguage message from the specified reader or buffer. * @function decode * @memberof cs.TbLanguage * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {cs.TbLanguage} TbLanguage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ TbLanguage.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.cs.TbLanguage(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { if (!(message.items && message.items.length)) message.items = []; message.items.push($root.cs.Language.decode(reader, reader.uint32())); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a TbLanguage message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof cs.TbLanguage * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {cs.TbLanguage} TbLanguage * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ TbLanguage.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a TbLanguage message. * @function verify * @memberof cs.TbLanguage * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ TbLanguage.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.items != null && message.hasOwnProperty("items")) { if (!Array.isArray(message.items)) return "items: array expected"; for (var i = 0; i < message.items.length; ++i) { var error = $root.cs.Language.verify(message.items[i]); if (error) return "items." + error; } } return null; }; /** * Creates a TbLanguage message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof cs.TbLanguage * @static * @param {Object.} object Plain object * @returns {cs.TbLanguage} TbLanguage */ TbLanguage.fromObject = function fromObject(object) { if (object instanceof $root.cs.TbLanguage) return object; var message = new $root.cs.TbLanguage(); if (object.items) { if (!Array.isArray(object.items)) throw TypeError(".cs.TbLanguage.items: array expected"); message.items = []; for (var i = 0; i < object.items.length; ++i) { if (typeof object.items[i] !== "object") throw TypeError(".cs.TbLanguage.items: object expected"); message.items[i] = $root.cs.Language.fromObject(object.items[i]); } } return message; }; /** * Creates a plain object from a TbLanguage message. Also converts values to other types if specified. * @function toObject * @memberof cs.TbLanguage * @static * @param {cs.TbLanguage} message TbLanguage * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ TbLanguage.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) object.items = []; if (message.items && message.items.length) { object.items = []; for (var j = 0; j < message.items.length; ++j) object.items[j] = $root.cs.Language.toObject(message.items[j], options); } return object; }; /** * Converts this TbLanguage to JSON. * @function toJSON * @memberof cs.TbLanguage * @instance * @returns {Object.} JSON object */ TbLanguage.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for TbLanguage * @function getTypeUrl * @memberof cs.TbLanguage * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ TbLanguage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/cs.TbLanguage"; }; return TbLanguage; })(); cs.TbGirls = (function() { /** * Properties of a TbGirls. * @memberof cs * @interface ITbGirls * @property {Array.|null} [items] TbGirls items */ /** * Constructs a new TbGirls. * @memberof cs * @classdesc Represents a TbGirls. * @implements ITbGirls * @constructor * @param {cs.ITbGirls=} [properties] Properties to set */ function TbGirls(properties) { this.items = []; 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]]; } /** * TbGirls items. * @member {Array.} items * @memberof cs.TbGirls * @instance */ TbGirls.prototype.items = $util.emptyArray; /** * Creates a new TbGirls instance using the specified properties. * @function create * @memberof cs.TbGirls * @static * @param {cs.ITbGirls=} [properties] Properties to set * @returns {cs.TbGirls} TbGirls instance */ TbGirls.create = function create(properties) { return new TbGirls(properties); }; /** * Encodes the specified TbGirls message. Does not implicitly {@link cs.TbGirls.verify|verify} messages. * @function encode * @memberof cs.TbGirls * @static * @param {cs.ITbGirls} message TbGirls message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ TbGirls.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.items != null && message.items.length) for (var i = 0; i < message.items.length; ++i) $root.cs.Girls.encode(message.items[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** * Encodes the specified TbGirls message, length delimited. Does not implicitly {@link cs.TbGirls.verify|verify} messages. * @function encodeDelimited * @memberof cs.TbGirls * @static * @param {cs.ITbGirls} message TbGirls message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ TbGirls.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a TbGirls message from the specified reader or buffer. * @function decode * @memberof cs.TbGirls * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {cs.TbGirls} TbGirls * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ TbGirls.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.cs.TbGirls(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { if (!(message.items && message.items.length)) message.items = []; message.items.push($root.cs.Girls.decode(reader, reader.uint32())); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a TbGirls message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof cs.TbGirls * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {cs.TbGirls} TbGirls * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ TbGirls.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a TbGirls message. * @function verify * @memberof cs.TbGirls * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ TbGirls.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.items != null && message.hasOwnProperty("items")) { if (!Array.isArray(message.items)) return "items: array expected"; for (var i = 0; i < message.items.length; ++i) { var error = $root.cs.Girls.verify(message.items[i]); if (error) return "items." + error; } } return null; }; /** * Creates a TbGirls message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof cs.TbGirls * @static * @param {Object.} object Plain object * @returns {cs.TbGirls} TbGirls */ TbGirls.fromObject = function fromObject(object) { if (object instanceof $root.cs.TbGirls) return object; var message = new $root.cs.TbGirls(); if (object.items) { if (!Array.isArray(object.items)) throw TypeError(".cs.TbGirls.items: array expected"); message.items = []; for (var i = 0; i < object.items.length; ++i) { if (typeof object.items[i] !== "object") throw TypeError(".cs.TbGirls.items: object expected"); message.items[i] = $root.cs.Girls.fromObject(object.items[i]); } } return message; }; /** * Creates a plain object from a TbGirls message. Also converts values to other types if specified. * @function toObject * @memberof cs.TbGirls * @static * @param {cs.TbGirls} message TbGirls * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ TbGirls.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) object.items = []; if (message.items && message.items.length) { object.items = []; for (var j = 0; j < message.items.length; ++j) object.items[j] = $root.cs.Girls.toObject(message.items[j], options); } return object; }; /** * Converts this TbGirls to JSON. * @function toJSON * @memberof cs.TbGirls * @instance * @returns {Object.} JSON object */ TbGirls.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for TbGirls * @function getTypeUrl * @memberof cs.TbGirls * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ TbGirls.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/cs.TbGirls"; }; return TbGirls; })(); cs.TbGirlsDetail = (function() { /** * Properties of a TbGirlsDetail. * @memberof cs * @interface ITbGirlsDetail * @property {Array.|null} [items] TbGirlsDetail items */ /** * Constructs a new TbGirlsDetail. * @memberof cs * @classdesc Represents a TbGirlsDetail. * @implements ITbGirlsDetail * @constructor * @param {cs.ITbGirlsDetail=} [properties] Properties to set */ function TbGirlsDetail(properties) { this.items = []; 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]]; } /** * TbGirlsDetail items. * @member {Array.} items * @memberof cs.TbGirlsDetail * @instance */ TbGirlsDetail.prototype.items = $util.emptyArray; /** * Creates a new TbGirlsDetail instance using the specified properties. * @function create * @memberof cs.TbGirlsDetail * @static * @param {cs.ITbGirlsDetail=} [properties] Properties to set * @returns {cs.TbGirlsDetail} TbGirlsDetail instance */ TbGirlsDetail.create = function create(properties) { return new TbGirlsDetail(properties); }; /** * Encodes the specified TbGirlsDetail message. Does not implicitly {@link cs.TbGirlsDetail.verify|verify} messages. * @function encode * @memberof cs.TbGirlsDetail * @static * @param {cs.ITbGirlsDetail} message TbGirlsDetail message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ TbGirlsDetail.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.items != null && message.items.length) for (var i = 0; i < message.items.length; ++i) $root.cs.GirlsDetail.encode(message.items[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** * Encodes the specified TbGirlsDetail message, length delimited. Does not implicitly {@link cs.TbGirlsDetail.verify|verify} messages. * @function encodeDelimited * @memberof cs.TbGirlsDetail * @static * @param {cs.ITbGirlsDetail} message TbGirlsDetail message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ TbGirlsDetail.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a TbGirlsDetail message from the specified reader or buffer. * @function decode * @memberof cs.TbGirlsDetail * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {cs.TbGirlsDetail} TbGirlsDetail * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ TbGirlsDetail.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.cs.TbGirlsDetail(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { if (!(message.items && message.items.length)) message.items = []; message.items.push($root.cs.GirlsDetail.decode(reader, reader.uint32())); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a TbGirlsDetail message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof cs.TbGirlsDetail * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {cs.TbGirlsDetail} TbGirlsDetail * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ TbGirlsDetail.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a TbGirlsDetail message. * @function verify * @memberof cs.TbGirlsDetail * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ TbGirlsDetail.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.items != null && message.hasOwnProperty("items")) { if (!Array.isArray(message.items)) return "items: array expected"; for (var i = 0; i < message.items.length; ++i) { var error = $root.cs.GirlsDetail.verify(message.items[i]); if (error) return "items." + error; } } return null; }; /** * Creates a TbGirlsDetail message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof cs.TbGirlsDetail * @static * @param {Object.} object Plain object * @returns {cs.TbGirlsDetail} TbGirlsDetail */ TbGirlsDetail.fromObject = function fromObject(object) { if (object instanceof $root.cs.TbGirlsDetail) return object; var message = new $root.cs.TbGirlsDetail(); if (object.items) { if (!Array.isArray(object.items)) throw TypeError(".cs.TbGirlsDetail.items: array expected"); message.items = []; for (var i = 0; i < object.items.length; ++i) { if (typeof object.items[i] !== "object") throw TypeError(".cs.TbGirlsDetail.items: object expected"); message.items[i] = $root.cs.GirlsDetail.fromObject(object.items[i]); } } return message; }; /** * Creates a plain object from a TbGirlsDetail message. Also converts values to other types if specified. * @function toObject * @memberof cs.TbGirlsDetail * @static * @param {cs.TbGirlsDetail} message TbGirlsDetail * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ TbGirlsDetail.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) object.items = []; if (message.items && message.items.length) { object.items = []; for (var j = 0; j < message.items.length; ++j) object.items[j] = $root.cs.GirlsDetail.toObject(message.items[j], options); } return object; }; /** * Converts this TbGirlsDetail to JSON. * @function toJSON * @memberof cs.TbGirlsDetail * @instance * @returns {Object.} JSON object */ TbGirlsDetail.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for TbGirlsDetail * @function getTypeUrl * @memberof cs.TbGirlsDetail * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ TbGirlsDetail.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/cs.TbGirlsDetail"; }; return TbGirlsDetail; })(); cs.TbThemes = (function() { /** * Properties of a TbThemes. * @memberof cs * @interface ITbThemes * @property {Array.|null} [items] TbThemes items */ /** * Constructs a new TbThemes. * @memberof cs * @classdesc Represents a TbThemes. * @implements ITbThemes * @constructor * @param {cs.ITbThemes=} [properties] Properties to set */ function TbThemes(properties) { this.items = []; 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]]; } /** * TbThemes items. * @member {Array.} items * @memberof cs.TbThemes * @instance */ TbThemes.prototype.items = $util.emptyArray; /** * Creates a new TbThemes instance using the specified properties. * @function create * @memberof cs.TbThemes * @static * @param {cs.ITbThemes=} [properties] Properties to set * @returns {cs.TbThemes} TbThemes instance */ TbThemes.create = function create(properties) { return new TbThemes(properties); }; /** * Encodes the specified TbThemes message. Does not implicitly {@link cs.TbThemes.verify|verify} messages. * @function encode * @memberof cs.TbThemes * @static * @param {cs.ITbThemes} message TbThemes message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ TbThemes.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.items != null && message.items.length) for (var i = 0; i < message.items.length; ++i) $root.cs.Themes.encode(message.items[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** * Encodes the specified TbThemes message, length delimited. Does not implicitly {@link cs.TbThemes.verify|verify} messages. * @function encodeDelimited * @memberof cs.TbThemes * @static * @param {cs.ITbThemes} message TbThemes message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ TbThemes.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a TbThemes message from the specified reader or buffer. * @function decode * @memberof cs.TbThemes * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {cs.TbThemes} TbThemes * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ TbThemes.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.cs.TbThemes(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { if (!(message.items && message.items.length)) message.items = []; message.items.push($root.cs.Themes.decode(reader, reader.uint32())); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a TbThemes message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof cs.TbThemes * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {cs.TbThemes} TbThemes * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ TbThemes.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a TbThemes message. * @function verify * @memberof cs.TbThemes * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ TbThemes.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.items != null && message.hasOwnProperty("items")) { if (!Array.isArray(message.items)) return "items: array expected"; for (var i = 0; i < message.items.length; ++i) { var error = $root.cs.Themes.verify(message.items[i]); if (error) return "items." + error; } } return null; }; /** * Creates a TbThemes message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof cs.TbThemes * @static * @param {Object.} object Plain object * @returns {cs.TbThemes} TbThemes */ TbThemes.fromObject = function fromObject(object) { if (object instanceof $root.cs.TbThemes) return object; var message = new $root.cs.TbThemes(); if (object.items) { if (!Array.isArray(object.items)) throw TypeError(".cs.TbThemes.items: array expected"); message.items = []; for (var i = 0; i < object.items.length; ++i) { if (typeof object.items[i] !== "object") throw TypeError(".cs.TbThemes.items: object expected"); message.items[i] = $root.cs.Themes.fromObject(object.items[i]); } } return message; }; /** * Creates a plain object from a TbThemes message. Also converts values to other types if specified. * @function toObject * @memberof cs.TbThemes * @static * @param {cs.TbThemes} message TbThemes * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ TbThemes.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) object.items = []; if (message.items && message.items.length) { object.items = []; for (var j = 0; j < message.items.length; ++j) object.items[j] = $root.cs.Themes.toObject(message.items[j], options); } return object; }; /** * Converts this TbThemes to JSON. * @function toJSON * @memberof cs.TbThemes * @instance * @returns {Object.} JSON object */ TbThemes.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for TbThemes * @function getTypeUrl * @memberof cs.TbThemes * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ TbThemes.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/cs.TbThemes"; }; return TbThemes; })(); cs.TbAiCharacters = (function() { /** * Properties of a TbAiCharacters. * @memberof cs * @interface ITbAiCharacters * @property {Array.|null} [items] TbAiCharacters items */ /** * Constructs a new TbAiCharacters. * @memberof cs * @classdesc Represents a TbAiCharacters. * @implements ITbAiCharacters * @constructor * @param {cs.ITbAiCharacters=} [properties] Properties to set */ function TbAiCharacters(properties) { this.items = []; 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]]; } /** * TbAiCharacters items. * @member {Array.} items * @memberof cs.TbAiCharacters * @instance */ TbAiCharacters.prototype.items = $util.emptyArray; /** * Creates a new TbAiCharacters instance using the specified properties. * @function create * @memberof cs.TbAiCharacters * @static * @param {cs.ITbAiCharacters=} [properties] Properties to set * @returns {cs.TbAiCharacters} TbAiCharacters instance */ TbAiCharacters.create = function create(properties) { return new TbAiCharacters(properties); }; /** * Encodes the specified TbAiCharacters message. Does not implicitly {@link cs.TbAiCharacters.verify|verify} messages. * @function encode * @memberof cs.TbAiCharacters * @static * @param {cs.ITbAiCharacters} message TbAiCharacters message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ TbAiCharacters.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.items != null && message.items.length) for (var i = 0; i < message.items.length; ++i) $root.cs.AiCharacters.encode(message.items[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** * Encodes the specified TbAiCharacters message, length delimited. Does not implicitly {@link cs.TbAiCharacters.verify|verify} messages. * @function encodeDelimited * @memberof cs.TbAiCharacters * @static * @param {cs.ITbAiCharacters} message TbAiCharacters message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ TbAiCharacters.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a TbAiCharacters message from the specified reader or buffer. * @function decode * @memberof cs.TbAiCharacters * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {cs.TbAiCharacters} TbAiCharacters * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ TbAiCharacters.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.cs.TbAiCharacters(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { if (!(message.items && message.items.length)) message.items = []; message.items.push($root.cs.AiCharacters.decode(reader, reader.uint32())); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a TbAiCharacters message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof cs.TbAiCharacters * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {cs.TbAiCharacters} TbAiCharacters * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ TbAiCharacters.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a TbAiCharacters message. * @function verify * @memberof cs.TbAiCharacters * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ TbAiCharacters.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.items != null && message.hasOwnProperty("items")) { if (!Array.isArray(message.items)) return "items: array expected"; for (var i = 0; i < message.items.length; ++i) { var error = $root.cs.AiCharacters.verify(message.items[i]); if (error) return "items." + error; } } return null; }; /** * Creates a TbAiCharacters message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof cs.TbAiCharacters * @static * @param {Object.} object Plain object * @returns {cs.TbAiCharacters} TbAiCharacters */ TbAiCharacters.fromObject = function fromObject(object) { if (object instanceof $root.cs.TbAiCharacters) return object; var message = new $root.cs.TbAiCharacters(); if (object.items) { if (!Array.isArray(object.items)) throw TypeError(".cs.TbAiCharacters.items: array expected"); message.items = []; for (var i = 0; i < object.items.length; ++i) { if (typeof object.items[i] !== "object") throw TypeError(".cs.TbAiCharacters.items: object expected"); message.items[i] = $root.cs.AiCharacters.fromObject(object.items[i]); } } return message; }; /** * Creates a plain object from a TbAiCharacters message. Also converts values to other types if specified. * @function toObject * @memberof cs.TbAiCharacters * @static * @param {cs.TbAiCharacters} message TbAiCharacters * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ TbAiCharacters.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) object.items = []; if (message.items && message.items.length) { object.items = []; for (var j = 0; j < message.items.length; ++j) object.items[j] = $root.cs.AiCharacters.toObject(message.items[j], options); } return object; }; /** * Converts this TbAiCharacters to JSON. * @function toJSON * @memberof cs.TbAiCharacters * @instance * @returns {Object.} JSON object */ TbAiCharacters.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for TbAiCharacters * @function getTypeUrl * @memberof cs.TbAiCharacters * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ TbAiCharacters.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/cs.TbAiCharacters"; }; return TbAiCharacters; })(); cs.TbGlobalConfig = (function() { /** * Properties of a TbGlobalConfig. * @memberof cs * @interface ITbGlobalConfig * @property {Array.|null} [items] TbGlobalConfig items */ /** * Constructs a new TbGlobalConfig. * @memberof cs * @classdesc Represents a TbGlobalConfig. * @implements ITbGlobalConfig * @constructor * @param {cs.ITbGlobalConfig=} [properties] Properties to set */ function TbGlobalConfig(properties) { this.items = []; 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]]; } /** * TbGlobalConfig items. * @member {Array.} items * @memberof cs.TbGlobalConfig * @instance */ TbGlobalConfig.prototype.items = $util.emptyArray; /** * Creates a new TbGlobalConfig instance using the specified properties. * @function create * @memberof cs.TbGlobalConfig * @static * @param {cs.ITbGlobalConfig=} [properties] Properties to set * @returns {cs.TbGlobalConfig} TbGlobalConfig instance */ TbGlobalConfig.create = function create(properties) { return new TbGlobalConfig(properties); }; /** * Encodes the specified TbGlobalConfig message. Does not implicitly {@link cs.TbGlobalConfig.verify|verify} messages. * @function encode * @memberof cs.TbGlobalConfig * @static * @param {cs.ITbGlobalConfig} message TbGlobalConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ TbGlobalConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.items != null && message.items.length) for (var i = 0; i < message.items.length; ++i) $root.cs.GlobalConfig.encode(message.items[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** * Encodes the specified TbGlobalConfig message, length delimited. Does not implicitly {@link cs.TbGlobalConfig.verify|verify} messages. * @function encodeDelimited * @memberof cs.TbGlobalConfig * @static * @param {cs.ITbGlobalConfig} message TbGlobalConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ TbGlobalConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a TbGlobalConfig message from the specified reader or buffer. * @function decode * @memberof cs.TbGlobalConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {cs.TbGlobalConfig} TbGlobalConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ TbGlobalConfig.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.cs.TbGlobalConfig(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { if (!(message.items && message.items.length)) message.items = []; message.items.push($root.cs.GlobalConfig.decode(reader, reader.uint32())); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a TbGlobalConfig message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof cs.TbGlobalConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {cs.TbGlobalConfig} TbGlobalConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ TbGlobalConfig.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a TbGlobalConfig message. * @function verify * @memberof cs.TbGlobalConfig * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ TbGlobalConfig.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.items != null && message.hasOwnProperty("items")) { if (!Array.isArray(message.items)) return "items: array expected"; for (var i = 0; i < message.items.length; ++i) { var error = $root.cs.GlobalConfig.verify(message.items[i]); if (error) return "items." + error; } } return null; }; /** * Creates a TbGlobalConfig message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof cs.TbGlobalConfig * @static * @param {Object.} object Plain object * @returns {cs.TbGlobalConfig} TbGlobalConfig */ TbGlobalConfig.fromObject = function fromObject(object) { if (object instanceof $root.cs.TbGlobalConfig) return object; var message = new $root.cs.TbGlobalConfig(); if (object.items) { if (!Array.isArray(object.items)) throw TypeError(".cs.TbGlobalConfig.items: array expected"); message.items = []; for (var i = 0; i < object.items.length; ++i) { if (typeof object.items[i] !== "object") throw TypeError(".cs.TbGlobalConfig.items: object expected"); message.items[i] = $root.cs.GlobalConfig.fromObject(object.items[i]); } } return message; }; /** * Creates a plain object from a TbGlobalConfig message. Also converts values to other types if specified. * @function toObject * @memberof cs.TbGlobalConfig * @static * @param {cs.TbGlobalConfig} message TbGlobalConfig * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ TbGlobalConfig.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) object.items = []; if (message.items && message.items.length) { object.items = []; for (var j = 0; j < message.items.length; ++j) object.items[j] = $root.cs.GlobalConfig.toObject(message.items[j], options); } return object; }; /** * Converts this TbGlobalConfig to JSON. * @function toJSON * @memberof cs.TbGlobalConfig * @instance * @returns {Object.} JSON object */ TbGlobalConfig.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for TbGlobalConfig * @function getTypeUrl * @memberof cs.TbGlobalConfig * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ TbGlobalConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/cs.TbGlobalConfig"; }; return TbGlobalConfig; })(); cs.TbPurchaseConfig = (function() { /** * Properties of a TbPurchaseConfig. * @memberof cs * @interface ITbPurchaseConfig * @property {Array.|null} [items] TbPurchaseConfig items */ /** * Constructs a new TbPurchaseConfig. * @memberof cs * @classdesc Represents a TbPurchaseConfig. * @implements ITbPurchaseConfig * @constructor * @param {cs.ITbPurchaseConfig=} [properties] Properties to set */ function TbPurchaseConfig(properties) { this.items = []; 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]]; } /** * TbPurchaseConfig items. * @member {Array.} items * @memberof cs.TbPurchaseConfig * @instance */ TbPurchaseConfig.prototype.items = $util.emptyArray; /** * Creates a new TbPurchaseConfig instance using the specified properties. * @function create * @memberof cs.TbPurchaseConfig * @static * @param {cs.ITbPurchaseConfig=} [properties] Properties to set * @returns {cs.TbPurchaseConfig} TbPurchaseConfig instance */ TbPurchaseConfig.create = function create(properties) { return new TbPurchaseConfig(properties); }; /** * Encodes the specified TbPurchaseConfig message. Does not implicitly {@link cs.TbPurchaseConfig.verify|verify} messages. * @function encode * @memberof cs.TbPurchaseConfig * @static * @param {cs.ITbPurchaseConfig} message TbPurchaseConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ TbPurchaseConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.items != null && message.items.length) for (var i = 0; i < message.items.length; ++i) $root.cs.PurchaseConfig.encode(message.items[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** * Encodes the specified TbPurchaseConfig message, length delimited. Does not implicitly {@link cs.TbPurchaseConfig.verify|verify} messages. * @function encodeDelimited * @memberof cs.TbPurchaseConfig * @static * @param {cs.ITbPurchaseConfig} message TbPurchaseConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ TbPurchaseConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a TbPurchaseConfig message from the specified reader or buffer. * @function decode * @memberof cs.TbPurchaseConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {cs.TbPurchaseConfig} TbPurchaseConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ TbPurchaseConfig.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.cs.TbPurchaseConfig(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { if (!(message.items && message.items.length)) message.items = []; message.items.push($root.cs.PurchaseConfig.decode(reader, reader.uint32())); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a TbPurchaseConfig message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof cs.TbPurchaseConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {cs.TbPurchaseConfig} TbPurchaseConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ TbPurchaseConfig.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a TbPurchaseConfig message. * @function verify * @memberof cs.TbPurchaseConfig * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ TbPurchaseConfig.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.items != null && message.hasOwnProperty("items")) { if (!Array.isArray(message.items)) return "items: array expected"; for (var i = 0; i < message.items.length; ++i) { var error = $root.cs.PurchaseConfig.verify(message.items[i]); if (error) return "items." + error; } } return null; }; /** * Creates a TbPurchaseConfig message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof cs.TbPurchaseConfig * @static * @param {Object.} object Plain object * @returns {cs.TbPurchaseConfig} TbPurchaseConfig */ TbPurchaseConfig.fromObject = function fromObject(object) { if (object instanceof $root.cs.TbPurchaseConfig) return object; var message = new $root.cs.TbPurchaseConfig(); if (object.items) { if (!Array.isArray(object.items)) throw TypeError(".cs.TbPurchaseConfig.items: array expected"); message.items = []; for (var i = 0; i < object.items.length; ++i) { if (typeof object.items[i] !== "object") throw TypeError(".cs.TbPurchaseConfig.items: object expected"); message.items[i] = $root.cs.PurchaseConfig.fromObject(object.items[i]); } } return message; }; /** * Creates a plain object from a TbPurchaseConfig message. Also converts values to other types if specified. * @function toObject * @memberof cs.TbPurchaseConfig * @static * @param {cs.TbPurchaseConfig} message TbPurchaseConfig * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ TbPurchaseConfig.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) object.items = []; if (message.items && message.items.length) { object.items = []; for (var j = 0; j < message.items.length; ++j) object.items[j] = $root.cs.PurchaseConfig.toObject(message.items[j], options); } return object; }; /** * Converts this TbPurchaseConfig to JSON. * @function toJSON * @memberof cs.TbPurchaseConfig * @instance * @returns {Object.} JSON object */ TbPurchaseConfig.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for TbPurchaseConfig * @function getTypeUrl * @memberof cs.TbPurchaseConfig * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ TbPurchaseConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/cs.TbPurchaseConfig"; }; return TbPurchaseConfig; })(); cs.CSLoginReq = (function() { /** * Properties of a CSLoginReq. * @memberof cs * @interface ICSLoginReq * @property {string|null} [platType] CSLoginReq platType * @property {string|null} [userId] CSLoginReq userId * @property {string|null} [device] CSLoginReq device * @property {number|null} [os] CSLoginReq os */ /** * Constructs a new CSLoginReq. * @memberof cs * @classdesc Represents a CSLoginReq. * @implements ICSLoginReq * @constructor * @param {cs.ICSLoginReq=} [properties] Properties to set */ function CSLoginReq(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]]; } /** * CSLoginReq platType. * @member {string} platType * @memberof cs.CSLoginReq * @instance */ CSLoginReq.prototype.platType = ""; /** * CSLoginReq userId. * @member {string} userId * @memberof cs.CSLoginReq * @instance */ CSLoginReq.prototype.userId = ""; /** * CSLoginReq device. * @member {string} device * @memberof cs.CSLoginReq * @instance */ CSLoginReq.prototype.device = ""; /** * CSLoginReq os. * @member {number} os * @memberof cs.CSLoginReq * @instance */ CSLoginReq.prototype.os = 0; /** * Creates a new CSLoginReq instance using the specified properties. * @function create * @memberof cs.CSLoginReq * @static * @param {cs.ICSLoginReq=} [properties] Properties to set * @returns {cs.CSLoginReq} CSLoginReq instance */ CSLoginReq.create = function create(properties) { return new CSLoginReq(properties); }; /** * Encodes the specified CSLoginReq message. Does not implicitly {@link cs.CSLoginReq.verify|verify} messages. * @function encode * @memberof cs.CSLoginReq * @static * @param {cs.ICSLoginReq} message CSLoginReq message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSLoginReq.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.platType != null && Object.hasOwnProperty.call(message, "platType")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.platType); if (message.userId != null && Object.hasOwnProperty.call(message, "userId")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.userId); if (message.device != null && Object.hasOwnProperty.call(message, "device")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.device); if (message.os != null && Object.hasOwnProperty.call(message, "os")) writer.uint32(/* id 4, wireType 0 =*/32).int32(message.os); return writer; }; /** * Encodes the specified CSLoginReq message, length delimited. Does not implicitly {@link cs.CSLoginReq.verify|verify} messages. * @function encodeDelimited * @memberof cs.CSLoginReq * @static * @param {cs.ICSLoginReq} message CSLoginReq message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSLoginReq.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a CSLoginReq message from the specified reader or buffer. * @function decode * @memberof cs.CSLoginReq * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {cs.CSLoginReq} CSLoginReq * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSLoginReq.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.cs.CSLoginReq(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { message.platType = reader.string(); break; } case 2: { message.userId = reader.string(); break; } case 3: { message.device = reader.string(); break; } case 4: { message.os = reader.int32(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a CSLoginReq message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof cs.CSLoginReq * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {cs.CSLoginReq} CSLoginReq * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSLoginReq.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a CSLoginReq message. * @function verify * @memberof cs.CSLoginReq * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ CSLoginReq.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.platType != null && message.hasOwnProperty("platType")) if (!$util.isString(message.platType)) return "platType: string expected"; if (message.userId != null && message.hasOwnProperty("userId")) if (!$util.isString(message.userId)) return "userId: string expected"; if (message.device != null && message.hasOwnProperty("device")) if (!$util.isString(message.device)) return "device: string expected"; if (message.os != null && message.hasOwnProperty("os")) if (!$util.isInteger(message.os)) return "os: integer expected"; return null; }; /** * Creates a CSLoginReq message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof cs.CSLoginReq * @static * @param {Object.} object Plain object * @returns {cs.CSLoginReq} CSLoginReq */ CSLoginReq.fromObject = function fromObject(object) { if (object instanceof $root.cs.CSLoginReq) return object; var message = new $root.cs.CSLoginReq(); if (object.platType != null) message.platType = String(object.platType); if (object.userId != null) message.userId = String(object.userId); if (object.device != null) message.device = String(object.device); if (object.os != null) message.os = object.os | 0; return message; }; /** * Creates a plain object from a CSLoginReq message. Also converts values to other types if specified. * @function toObject * @memberof cs.CSLoginReq * @static * @param {cs.CSLoginReq} message CSLoginReq * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ CSLoginReq.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.platType = ""; object.userId = ""; object.device = ""; object.os = 0; } if (message.platType != null && message.hasOwnProperty("platType")) object.platType = message.platType; if (message.userId != null && message.hasOwnProperty("userId")) object.userId = message.userId; if (message.device != null && message.hasOwnProperty("device")) object.device = message.device; if (message.os != null && message.hasOwnProperty("os")) object.os = message.os; return object; }; /** * Converts this CSLoginReq to JSON. * @function toJSON * @memberof cs.CSLoginReq * @instance * @returns {Object.} JSON object */ CSLoginReq.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for CSLoginReq * @function getTypeUrl * @memberof cs.CSLoginReq * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ CSLoginReq.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/cs.CSLoginReq"; }; return CSLoginReq; })(); cs.CSLoginRes = (function() { /** * Properties of a CSLoginRes. * @memberof cs * @interface ICSLoginRes * @property {string|null} [name] CSLoginRes name * @property {string|null} [token] CSLoginRes token * @property {string|null} [refreshToken] CSLoginRes refreshToken * @property {number|Long|null} [expire] CSLoginRes expire * @property {string|null} [accId] CSLoginRes accId * @property {string|null} [cdn] CSLoginRes cdn */ /** * Constructs a new CSLoginRes. * @memberof cs * @classdesc Represents a CSLoginRes. * @implements ICSLoginRes * @constructor * @param {cs.ICSLoginRes=} [properties] Properties to set */ function CSLoginRes(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]]; } /** * CSLoginRes name. * @member {string} name * @memberof cs.CSLoginRes * @instance */ CSLoginRes.prototype.name = ""; /** * CSLoginRes token. * @member {string} token * @memberof cs.CSLoginRes * @instance */ CSLoginRes.prototype.token = ""; /** * CSLoginRes refreshToken. * @member {string} refreshToken * @memberof cs.CSLoginRes * @instance */ CSLoginRes.prototype.refreshToken = ""; /** * CSLoginRes expire. * @member {number|Long} expire * @memberof cs.CSLoginRes * @instance */ CSLoginRes.prototype.expire = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * CSLoginRes accId. * @member {string} accId * @memberof cs.CSLoginRes * @instance */ CSLoginRes.prototype.accId = ""; /** * CSLoginRes cdn. * @member {string} cdn * @memberof cs.CSLoginRes * @instance */ CSLoginRes.prototype.cdn = ""; /** * Creates a new CSLoginRes instance using the specified properties. * @function create * @memberof cs.CSLoginRes * @static * @param {cs.ICSLoginRes=} [properties] Properties to set * @returns {cs.CSLoginRes} CSLoginRes instance */ CSLoginRes.create = function create(properties) { return new CSLoginRes(properties); }; /** * Encodes the specified CSLoginRes message. Does not implicitly {@link cs.CSLoginRes.verify|verify} messages. * @function encode * @memberof cs.CSLoginRes * @static * @param {cs.ICSLoginRes} message CSLoginRes message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSLoginRes.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); if (message.token != null && Object.hasOwnProperty.call(message, "token")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.token); if (message.refreshToken != null && Object.hasOwnProperty.call(message, "refreshToken")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.refreshToken); if (message.expire != null && Object.hasOwnProperty.call(message, "expire")) writer.uint32(/* id 4, wireType 0 =*/32).int64(message.expire); if (message.accId != null && Object.hasOwnProperty.call(message, "accId")) writer.uint32(/* id 5, wireType 2 =*/42).string(message.accId); if (message.cdn != null && Object.hasOwnProperty.call(message, "cdn")) writer.uint32(/* id 6, wireType 2 =*/50).string(message.cdn); return writer; }; /** * Encodes the specified CSLoginRes message, length delimited. Does not implicitly {@link cs.CSLoginRes.verify|verify} messages. * @function encodeDelimited * @memberof cs.CSLoginRes * @static * @param {cs.ICSLoginRes} message CSLoginRes message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSLoginRes.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a CSLoginRes message from the specified reader or buffer. * @function decode * @memberof cs.CSLoginRes * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {cs.CSLoginRes} CSLoginRes * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSLoginRes.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.cs.CSLoginRes(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { message.name = reader.string(); break; } case 2: { message.token = reader.string(); break; } case 3: { message.refreshToken = reader.string(); break; } case 4: { message.expire = reader.int64(); break; } case 5: { message.accId = reader.string(); break; } case 6: { message.cdn = reader.string(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a CSLoginRes message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof cs.CSLoginRes * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {cs.CSLoginRes} CSLoginRes * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSLoginRes.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a CSLoginRes message. * @function verify * @memberof cs.CSLoginRes * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ CSLoginRes.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; if (message.token != null && message.hasOwnProperty("token")) if (!$util.isString(message.token)) return "token: string expected"; if (message.refreshToken != null && message.hasOwnProperty("refreshToken")) if (!$util.isString(message.refreshToken)) return "refreshToken: string expected"; if (message.expire != null && message.hasOwnProperty("expire")) if (!$util.isInteger(message.expire) && !(message.expire && $util.isInteger(message.expire.low) && $util.isInteger(message.expire.high))) return "expire: integer|Long expected"; if (message.accId != null && message.hasOwnProperty("accId")) if (!$util.isString(message.accId)) return "accId: string expected"; if (message.cdn != null && message.hasOwnProperty("cdn")) if (!$util.isString(message.cdn)) return "cdn: string expected"; return null; }; /** * Creates a CSLoginRes message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof cs.CSLoginRes * @static * @param {Object.} object Plain object * @returns {cs.CSLoginRes} CSLoginRes */ CSLoginRes.fromObject = function fromObject(object) { if (object instanceof $root.cs.CSLoginRes) return object; var message = new $root.cs.CSLoginRes(); if (object.name != null) message.name = String(object.name); if (object.token != null) message.token = String(object.token); if (object.refreshToken != null) message.refreshToken = String(object.refreshToken); if (object.expire != null) if ($util.Long) (message.expire = $util.Long.fromValue(object.expire)).unsigned = false; else if (typeof object.expire === "string") message.expire = parseInt(object.expire, 10); else if (typeof object.expire === "number") message.expire = object.expire; else if (typeof object.expire === "object") message.expire = new $util.LongBits(object.expire.low >>> 0, object.expire.high >>> 0).toNumber(); if (object.accId != null) message.accId = String(object.accId); if (object.cdn != null) message.cdn = String(object.cdn); return message; }; /** * Creates a plain object from a CSLoginRes message. Also converts values to other types if specified. * @function toObject * @memberof cs.CSLoginRes * @static * @param {cs.CSLoginRes} message CSLoginRes * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ CSLoginRes.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.name = ""; object.token = ""; object.refreshToken = ""; if ($util.Long) { var long = new $util.Long(0, 0, false); object.expire = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.expire = options.longs === String ? "0" : 0; object.accId = ""; object.cdn = ""; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; if (message.token != null && message.hasOwnProperty("token")) object.token = message.token; if (message.refreshToken != null && message.hasOwnProperty("refreshToken")) object.refreshToken = message.refreshToken; if (message.expire != null && message.hasOwnProperty("expire")) if (typeof message.expire === "number") object.expire = options.longs === String ? String(message.expire) : message.expire; else object.expire = options.longs === String ? $util.Long.prototype.toString.call(message.expire) : options.longs === Number ? new $util.LongBits(message.expire.low >>> 0, message.expire.high >>> 0).toNumber() : message.expire; if (message.accId != null && message.hasOwnProperty("accId")) object.accId = message.accId; if (message.cdn != null && message.hasOwnProperty("cdn")) object.cdn = message.cdn; return object; }; /** * Converts this CSLoginRes to JSON. * @function toJSON * @memberof cs.CSLoginRes * @instance * @returns {Object.} JSON object */ CSLoginRes.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for CSLoginRes * @function getTypeUrl * @memberof cs.CSLoginRes * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ CSLoginRes.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/cs.CSLoginRes"; }; return CSLoginRes; })(); cs.CSMyInfoReq = (function() { /** * Properties of a CSMyInfoReq. * @memberof cs * @interface ICSMyInfoReq */ /** * Constructs a new CSMyInfoReq. * @memberof cs * @classdesc Represents a CSMyInfoReq. * @implements ICSMyInfoReq * @constructor * @param {cs.ICSMyInfoReq=} [properties] Properties to set */ function CSMyInfoReq(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 CSMyInfoReq instance using the specified properties. * @function create * @memberof cs.CSMyInfoReq * @static * @param {cs.ICSMyInfoReq=} [properties] Properties to set * @returns {cs.CSMyInfoReq} CSMyInfoReq instance */ CSMyInfoReq.create = function create(properties) { return new CSMyInfoReq(properties); }; /** * Encodes the specified CSMyInfoReq message. Does not implicitly {@link cs.CSMyInfoReq.verify|verify} messages. * @function encode * @memberof cs.CSMyInfoReq * @static * @param {cs.ICSMyInfoReq} message CSMyInfoReq message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSMyInfoReq.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); return writer; }; /** * Encodes the specified CSMyInfoReq message, length delimited. Does not implicitly {@link cs.CSMyInfoReq.verify|verify} messages. * @function encodeDelimited * @memberof cs.CSMyInfoReq * @static * @param {cs.ICSMyInfoReq} message CSMyInfoReq message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSMyInfoReq.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a CSMyInfoReq message from the specified reader or buffer. * @function decode * @memberof cs.CSMyInfoReq * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {cs.CSMyInfoReq} CSMyInfoReq * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSMyInfoReq.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.cs.CSMyInfoReq(); 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 CSMyInfoReq message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof cs.CSMyInfoReq * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {cs.CSMyInfoReq} CSMyInfoReq * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSMyInfoReq.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a CSMyInfoReq message. * @function verify * @memberof cs.CSMyInfoReq * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ CSMyInfoReq.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; return null; }; /** * Creates a CSMyInfoReq message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof cs.CSMyInfoReq * @static * @param {Object.} object Plain object * @returns {cs.CSMyInfoReq} CSMyInfoReq */ CSMyInfoReq.fromObject = function fromObject(object) { if (object instanceof $root.cs.CSMyInfoReq) return object; return new $root.cs.CSMyInfoReq(); }; /** * Creates a plain object from a CSMyInfoReq message. Also converts values to other types if specified. * @function toObject * @memberof cs.CSMyInfoReq * @static * @param {cs.CSMyInfoReq} message CSMyInfoReq * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ CSMyInfoReq.toObject = function toObject() { return {}; }; /** * Converts this CSMyInfoReq to JSON. * @function toJSON * @memberof cs.CSMyInfoReq * @instance * @returns {Object.} JSON object */ CSMyInfoReq.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for CSMyInfoReq * @function getTypeUrl * @memberof cs.CSMyInfoReq * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ CSMyInfoReq.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/cs.CSMyInfoReq"; }; return CSMyInfoReq; })(); cs.CSMyInfoRes = (function() { /** * Properties of a CSMyInfoRes. * @memberof cs * @interface ICSMyInfoRes * @property {number|Long|null} [balance] CSMyInfoRes balance * @property {number|Long|null} [vipExpire] CSMyInfoRes vipExpire */ /** * Constructs a new CSMyInfoRes. * @memberof cs * @classdesc Represents a CSMyInfoRes. * @implements ICSMyInfoRes * @constructor * @param {cs.ICSMyInfoRes=} [properties] Properties to set */ function CSMyInfoRes(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]]; } /** * CSMyInfoRes balance. * @member {number|Long} balance * @memberof cs.CSMyInfoRes * @instance */ CSMyInfoRes.prototype.balance = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * CSMyInfoRes vipExpire. * @member {number|Long} vipExpire * @memberof cs.CSMyInfoRes * @instance */ CSMyInfoRes.prototype.vipExpire = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** * Creates a new CSMyInfoRes instance using the specified properties. * @function create * @memberof cs.CSMyInfoRes * @static * @param {cs.ICSMyInfoRes=} [properties] Properties to set * @returns {cs.CSMyInfoRes} CSMyInfoRes instance */ CSMyInfoRes.create = function create(properties) { return new CSMyInfoRes(properties); }; /** * Encodes the specified CSMyInfoRes message. Does not implicitly {@link cs.CSMyInfoRes.verify|verify} messages. * @function encode * @memberof cs.CSMyInfoRes * @static * @param {cs.ICSMyInfoRes} message CSMyInfoRes message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSMyInfoRes.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.balance != null && Object.hasOwnProperty.call(message, "balance")) writer.uint32(/* id 1, wireType 0 =*/8).int64(message.balance); if (message.vipExpire != null && Object.hasOwnProperty.call(message, "vipExpire")) writer.uint32(/* id 2, wireType 0 =*/16).int64(message.vipExpire); return writer; }; /** * Encodes the specified CSMyInfoRes message, length delimited. Does not implicitly {@link cs.CSMyInfoRes.verify|verify} messages. * @function encodeDelimited * @memberof cs.CSMyInfoRes * @static * @param {cs.ICSMyInfoRes} message CSMyInfoRes message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ CSMyInfoRes.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** * Decodes a CSMyInfoRes message from the specified reader or buffer. * @function decode * @memberof cs.CSMyInfoRes * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand * @returns {cs.CSMyInfoRes} CSMyInfoRes * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSMyInfoRes.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.cs.CSMyInfoRes(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { message.balance = reader.int64(); break; } case 2: { message.vipExpire = reader.int64(); break; } default: reader.skipType(tag & 7); break; } } return message; }; /** * Decodes a CSMyInfoRes message from the specified reader or buffer, length delimited. * @function decodeDelimited * @memberof cs.CSMyInfoRes * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @returns {cs.CSMyInfoRes} CSMyInfoRes * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ CSMyInfoRes.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** * Verifies a CSMyInfoRes message. * @function verify * @memberof cs.CSMyInfoRes * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ CSMyInfoRes.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.balance != null && message.hasOwnProperty("balance")) if (!$util.isInteger(message.balance) && !(message.balance && $util.isInteger(message.balance.low) && $util.isInteger(message.balance.high))) return "balance: integer|Long expected"; if (message.vipExpire != null && message.hasOwnProperty("vipExpire")) if (!$util.isInteger(message.vipExpire) && !(message.vipExpire && $util.isInteger(message.vipExpire.low) && $util.isInteger(message.vipExpire.high))) return "vipExpire: integer|Long expected"; return null; }; /** * Creates a CSMyInfoRes message from a plain object. Also converts values to their respective internal types. * @function fromObject * @memberof cs.CSMyInfoRes * @static * @param {Object.} object Plain object * @returns {cs.CSMyInfoRes} CSMyInfoRes */ CSMyInfoRes.fromObject = function fromObject(object) { if (object instanceof $root.cs.CSMyInfoRes) return object; var message = new $root.cs.CSMyInfoRes(); if (object.balance != null) if ($util.Long) (message.balance = $util.Long.fromValue(object.balance)).unsigned = false; else if (typeof object.balance === "string") message.balance = parseInt(object.balance, 10); else if (typeof object.balance === "number") message.balance = object.balance; else if (typeof object.balance === "object") message.balance = new $util.LongBits(object.balance.low >>> 0, object.balance.high >>> 0).toNumber(); if (object.vipExpire != null) if ($util.Long) (message.vipExpire = $util.Long.fromValue(object.vipExpire)).unsigned = false; else if (typeof object.vipExpire === "string") message.vipExpire = parseInt(object.vipExpire, 10); else if (typeof object.vipExpire === "number") message.vipExpire = object.vipExpire; else if (typeof object.vipExpire === "object") message.vipExpire = new $util.LongBits(object.vipExpire.low >>> 0, object.vipExpire.high >>> 0).toNumber(); return message; }; /** * Creates a plain object from a CSMyInfoRes message. Also converts values to other types if specified. * @function toObject * @memberof cs.CSMyInfoRes * @static * @param {cs.CSMyInfoRes} message CSMyInfoRes * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ CSMyInfoRes.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.balance = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.balance = options.longs === String ? "0" : 0; if ($util.Long) { var long = new $util.Long(0, 0, false); object.vipExpire = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.vipExpire = options.longs === String ? "0" : 0; } if (message.balance != null && message.hasOwnProperty("balance")) if (typeof message.balance === "number") object.balance = options.longs === String ? String(message.balance) : message.balance; else object.balance = options.longs === String ? $util.Long.prototype.toString.call(message.balance) : options.longs === Number ? new $util.LongBits(message.balance.low >>> 0, message.balance.high >>> 0).toNumber() : message.balance; if (message.vipExpire != null && message.hasOwnProperty("vipExpire")) if (typeof message.vipExpire === "number") object.vipExpire = options.longs === String ? String(message.vipExpire) : message.vipExpire; else object.vipExpire = options.longs === String ? $util.Long.prototype.toString.call(message.vipExpire) : options.longs === Number ? new $util.LongBits(message.vipExpire.low >>> 0, message.vipExpire.high >>> 0).toNumber() : message.vipExpire; return object; }; /** * Converts this CSMyInfoRes to JSON. * @function toJSON * @memberof cs.CSMyInfoRes * @instance * @returns {Object.} JSON object */ CSMyInfoRes.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** * Gets the default type url for CSMyInfoRes * @function getTypeUrl * @memberof cs.CSMyInfoRes * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ CSMyInfoRes.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } return typeUrlPrefix + "/cs.CSMyInfoRes"; }; return CSMyInfoRes; })(); /** * EnmRetCode enum. * @name cs.EnmRetCode * @enum {number} * @property {number} SUCCESS=0 SUCCESS value * @property {number} GenJWTFailed=5000 GenJWTFailed value * @property {number} Insufficient=5001 Insufficient value * @property {number} InvalidArg=5002 InvalidArg value * @property {number} InvalidSign=5003 InvalidSign value * @property {number} JsonFormat=5004 JsonFormat value * @property {number} MySQL=5005 MySQL value * @property {number} NotRegist=5006 NotRegist value * @property {number} NotResConfig=5007 NotResConfig value * @property {number} Rate_Limited=5008 Rate_Limited value * @property {number} Redis=5009 Redis value * @property {number} Request_Too_More=5010 Request_Too_More value * @property {number} RMGOrder_Code=5011 RMGOrder_Code value * @property {number} RMGOrder_Http=5012 RMGOrder_Http value * @property {number} RMGOrder_MaxQuery=5013 RMGOrder_MaxQuery value * @property {number} RMGOrder_NotFound=5014 RMGOrder_NotFound value * @property {number} TokenExpire=5015 TokenExpire value * @property {number} TokenInvalid=5016 TokenInvalid value */ cs.EnmRetCode = (function() { var valuesById = {}, values = Object.create(valuesById); values[valuesById[0] = "SUCCESS"] = 0; values[valuesById[5000] = "GenJWTFailed"] = 5000; values[valuesById[5001] = "Insufficient"] = 5001; values[valuesById[5002] = "InvalidArg"] = 5002; values[valuesById[5003] = "InvalidSign"] = 5003; values[valuesById[5004] = "JsonFormat"] = 5004; values[valuesById[5005] = "MySQL"] = 5005; values[valuesById[5006] = "NotRegist"] = 5006; values[valuesById[5007] = "NotResConfig"] = 5007; values[valuesById[5008] = "Rate_Limited"] = 5008; values[valuesById[5009] = "Redis"] = 5009; values[valuesById[5010] = "Request_Too_More"] = 5010; values[valuesById[5011] = "RMGOrder_Code"] = 5011; values[valuesById[5012] = "RMGOrder_Http"] = 5012; values[valuesById[5013] = "RMGOrder_MaxQuery"] = 5013; values[valuesById[5014] = "RMGOrder_NotFound"] = 5014; values[valuesById[5015] = "TokenExpire"] = 5015; values[valuesById[5016] = "TokenInvalid"] = 5016; return values; })(); return cs; })(); module.exports = $root; module.exports.default = module.exports;