5535 lines
218 KiB
JavaScript
5535 lines
218 KiB
JavaScript
/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/
|
|
"use strict";
|
|
|
|
var $protobuf = require("protobufjs/minimal.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.GirlBrief = (function() {
|
|
|
|
/**
|
|
* Properties of a GirlBrief.
|
|
* @memberof cs
|
|
* @interface IGirlBrief
|
|
* @property {number|null} [id] GirlBrief id
|
|
* @property {string|null} [name] GirlBrief name
|
|
* @property {number|null} [age] GirlBrief age
|
|
* @property {string|null} [tagKey] GirlBrief tagKey
|
|
* @property {number|null} [priceType] GirlBrief priceType
|
|
* @property {number|Long|null} [price] GirlBrief price
|
|
* @property {string|null} [avatar] GirlBrief avatar
|
|
* @property {number|null} [star] GirlBrief star
|
|
*/
|
|
|
|
/**
|
|
* Constructs a new GirlBrief.
|
|
* @memberof cs
|
|
* @classdesc Represents a GirlBrief.
|
|
* @implements IGirlBrief
|
|
* @constructor
|
|
* @param {cs.IGirlBrief=} [properties] Properties to set
|
|
*/
|
|
function GirlBrief(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]];
|
|
}
|
|
|
|
/**
|
|
* GirlBrief id.
|
|
* @member {number} id
|
|
* @memberof cs.GirlBrief
|
|
* @instance
|
|
*/
|
|
GirlBrief.prototype.id = 0;
|
|
|
|
/**
|
|
* GirlBrief name.
|
|
* @member {string} name
|
|
* @memberof cs.GirlBrief
|
|
* @instance
|
|
*/
|
|
GirlBrief.prototype.name = "";
|
|
|
|
/**
|
|
* GirlBrief age.
|
|
* @member {number} age
|
|
* @memberof cs.GirlBrief
|
|
* @instance
|
|
*/
|
|
GirlBrief.prototype.age = 0;
|
|
|
|
/**
|
|
* GirlBrief tagKey.
|
|
* @member {string} tagKey
|
|
* @memberof cs.GirlBrief
|
|
* @instance
|
|
*/
|
|
GirlBrief.prototype.tagKey = "";
|
|
|
|
/**
|
|
* GirlBrief priceType.
|
|
* @member {number} priceType
|
|
* @memberof cs.GirlBrief
|
|
* @instance
|
|
*/
|
|
GirlBrief.prototype.priceType = 0;
|
|
|
|
/**
|
|
* GirlBrief price.
|
|
* @member {number|Long} price
|
|
* @memberof cs.GirlBrief
|
|
* @instance
|
|
*/
|
|
GirlBrief.prototype.price = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
|
|
|
|
/**
|
|
* GirlBrief avatar.
|
|
* @member {string} avatar
|
|
* @memberof cs.GirlBrief
|
|
* @instance
|
|
*/
|
|
GirlBrief.prototype.avatar = "";
|
|
|
|
/**
|
|
* GirlBrief star.
|
|
* @member {number} star
|
|
* @memberof cs.GirlBrief
|
|
* @instance
|
|
*/
|
|
GirlBrief.prototype.star = 0;
|
|
|
|
/**
|
|
* Creates a new GirlBrief instance using the specified properties.
|
|
* @function create
|
|
* @memberof cs.GirlBrief
|
|
* @static
|
|
* @param {cs.IGirlBrief=} [properties] Properties to set
|
|
* @returns {cs.GirlBrief} GirlBrief instance
|
|
*/
|
|
GirlBrief.create = function create(properties) {
|
|
return new GirlBrief(properties);
|
|
};
|
|
|
|
/**
|
|
* Encodes the specified GirlBrief message. Does not implicitly {@link cs.GirlBrief.verify|verify} messages.
|
|
* @function encode
|
|
* @memberof cs.GirlBrief
|
|
* @static
|
|
* @param {cs.IGirlBrief} message GirlBrief message or plain object to encode
|
|
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
* @returns {$protobuf.Writer} Writer
|
|
*/
|
|
GirlBrief.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.age != null && Object.hasOwnProperty.call(message, "age"))
|
|
writer.uint32(/* id 3, wireType 0 =*/24).int32(message.age);
|
|
if (message.tagKey != null && Object.hasOwnProperty.call(message, "tagKey"))
|
|
writer.uint32(/* id 4, wireType 2 =*/34).string(message.tagKey);
|
|
if (message.priceType != null && Object.hasOwnProperty.call(message, "priceType"))
|
|
writer.uint32(/* id 5, wireType 0 =*/40).int32(message.priceType);
|
|
if (message.price != null && Object.hasOwnProperty.call(message, "price"))
|
|
writer.uint32(/* id 6, wireType 0 =*/48).int64(message.price);
|
|
if (message.avatar != null && Object.hasOwnProperty.call(message, "avatar"))
|
|
writer.uint32(/* id 7, wireType 2 =*/58).string(message.avatar);
|
|
if (message.star != null && Object.hasOwnProperty.call(message, "star"))
|
|
writer.uint32(/* id 8, wireType 0 =*/64).int32(message.star);
|
|
return writer;
|
|
};
|
|
|
|
/**
|
|
* Encodes the specified GirlBrief message, length delimited. Does not implicitly {@link cs.GirlBrief.verify|verify} messages.
|
|
* @function encodeDelimited
|
|
* @memberof cs.GirlBrief
|
|
* @static
|
|
* @param {cs.IGirlBrief} message GirlBrief message or plain object to encode
|
|
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
* @returns {$protobuf.Writer} Writer
|
|
*/
|
|
GirlBrief.encodeDelimited = function encodeDelimited(message, writer) {
|
|
return this.encode(message, writer).ldelim();
|
|
};
|
|
|
|
/**
|
|
* Decodes a GirlBrief message from the specified reader or buffer.
|
|
* @function decode
|
|
* @memberof cs.GirlBrief
|
|
* @static
|
|
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
* @param {number} [length] Message length if known beforehand
|
|
* @returns {cs.GirlBrief} GirlBrief
|
|
* @throws {Error} If the payload is not a reader or valid buffer
|
|
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
*/
|
|
GirlBrief.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.GirlBrief();
|
|
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.age = reader.int32();
|
|
break;
|
|
}
|
|
case 4: {
|
|
message.tagKey = reader.string();
|
|
break;
|
|
}
|
|
case 5: {
|
|
message.priceType = reader.int32();
|
|
break;
|
|
}
|
|
case 6: {
|
|
message.price = reader.int64();
|
|
break;
|
|
}
|
|
case 7: {
|
|
message.avatar = reader.string();
|
|
break;
|
|
}
|
|
case 8: {
|
|
message.star = reader.int32();
|
|
break;
|
|
}
|
|
default:
|
|
reader.skipType(tag & 7);
|
|
break;
|
|
}
|
|
}
|
|
return message;
|
|
};
|
|
|
|
/**
|
|
* Decodes a GirlBrief message from the specified reader or buffer, length delimited.
|
|
* @function decodeDelimited
|
|
* @memberof cs.GirlBrief
|
|
* @static
|
|
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
* @returns {cs.GirlBrief} GirlBrief
|
|
* @throws {Error} If the payload is not a reader or valid buffer
|
|
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
*/
|
|
GirlBrief.decodeDelimited = function decodeDelimited(reader) {
|
|
if (!(reader instanceof $Reader))
|
|
reader = new $Reader(reader);
|
|
return this.decode(reader, reader.uint32());
|
|
};
|
|
|
|
/**
|
|
* Verifies a GirlBrief message.
|
|
* @function verify
|
|
* @memberof cs.GirlBrief
|
|
* @static
|
|
* @param {Object.<string,*>} message Plain object to verify
|
|
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
*/
|
|
GirlBrief.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.age != null && message.hasOwnProperty("age"))
|
|
if (!$util.isInteger(message.age))
|
|
return "age: integer expected";
|
|
if (message.tagKey != null && message.hasOwnProperty("tagKey"))
|
|
if (!$util.isString(message.tagKey))
|
|
return "tagKey: string expected";
|
|
if (message.priceType != null && message.hasOwnProperty("priceType"))
|
|
if (!$util.isInteger(message.priceType))
|
|
return "priceType: integer expected";
|
|
if (message.price != null && message.hasOwnProperty("price"))
|
|
if (!$util.isInteger(message.price) && !(message.price && $util.isInteger(message.price.low) && $util.isInteger(message.price.high)))
|
|
return "price: integer|Long expected";
|
|
if (message.avatar != null && message.hasOwnProperty("avatar"))
|
|
if (!$util.isString(message.avatar))
|
|
return "avatar: string expected";
|
|
if (message.star != null && message.hasOwnProperty("star"))
|
|
if (!$util.isInteger(message.star))
|
|
return "star: integer expected";
|
|
return null;
|
|
};
|
|
|
|
/**
|
|
* Creates a GirlBrief message from a plain object. Also converts values to their respective internal types.
|
|
* @function fromObject
|
|
* @memberof cs.GirlBrief
|
|
* @static
|
|
* @param {Object.<string,*>} object Plain object
|
|
* @returns {cs.GirlBrief} GirlBrief
|
|
*/
|
|
GirlBrief.fromObject = function fromObject(object) {
|
|
if (object instanceof $root.cs.GirlBrief)
|
|
return object;
|
|
var message = new $root.cs.GirlBrief();
|
|
if (object.id != null)
|
|
message.id = object.id | 0;
|
|
if (object.name != null)
|
|
message.name = String(object.name);
|
|
if (object.age != null)
|
|
message.age = object.age | 0;
|
|
if (object.tagKey != null)
|
|
message.tagKey = String(object.tagKey);
|
|
if (object.priceType != null)
|
|
message.priceType = object.priceType | 0;
|
|
if (object.price != null)
|
|
if ($util.Long)
|
|
(message.price = $util.Long.fromValue(object.price)).unsigned = false;
|
|
else if (typeof object.price === "string")
|
|
message.price = parseInt(object.price, 10);
|
|
else if (typeof object.price === "number")
|
|
message.price = object.price;
|
|
else if (typeof object.price === "object")
|
|
message.price = new $util.LongBits(object.price.low >>> 0, object.price.high >>> 0).toNumber();
|
|
if (object.avatar != null)
|
|
message.avatar = String(object.avatar);
|
|
if (object.star != null)
|
|
message.star = object.star | 0;
|
|
return message;
|
|
};
|
|
|
|
/**
|
|
* Creates a plain object from a GirlBrief message. Also converts values to other types if specified.
|
|
* @function toObject
|
|
* @memberof cs.GirlBrief
|
|
* @static
|
|
* @param {cs.GirlBrief} message GirlBrief
|
|
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
* @returns {Object.<string,*>} Plain object
|
|
*/
|
|
GirlBrief.toObject = function toObject(message, options) {
|
|
if (!options)
|
|
options = {};
|
|
var object = {};
|
|
if (options.defaults) {
|
|
object.id = 0;
|
|
object.name = "";
|
|
object.age = 0;
|
|
object.tagKey = "";
|
|
object.priceType = 0;
|
|
if ($util.Long) {
|
|
var long = new $util.Long(0, 0, false);
|
|
object.price = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
|
|
} else
|
|
object.price = options.longs === String ? "0" : 0;
|
|
object.avatar = "";
|
|
object.star = 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.age != null && message.hasOwnProperty("age"))
|
|
object.age = message.age;
|
|
if (message.tagKey != null && message.hasOwnProperty("tagKey"))
|
|
object.tagKey = message.tagKey;
|
|
if (message.priceType != null && message.hasOwnProperty("priceType"))
|
|
object.priceType = message.priceType;
|
|
if (message.price != null && message.hasOwnProperty("price"))
|
|
if (typeof message.price === "number")
|
|
object.price = options.longs === String ? String(message.price) : message.price;
|
|
else
|
|
object.price = options.longs === String ? $util.Long.prototype.toString.call(message.price) : options.longs === Number ? new $util.LongBits(message.price.low >>> 0, message.price.high >>> 0).toNumber() : message.price;
|
|
if (message.avatar != null && message.hasOwnProperty("avatar"))
|
|
object.avatar = message.avatar;
|
|
if (message.star != null && message.hasOwnProperty("star"))
|
|
object.star = message.star;
|
|
return object;
|
|
};
|
|
|
|
/**
|
|
* Converts this GirlBrief to JSON.
|
|
* @function toJSON
|
|
* @memberof cs.GirlBrief
|
|
* @instance
|
|
* @returns {Object.<string,*>} JSON object
|
|
*/
|
|
GirlBrief.prototype.toJSON = function toJSON() {
|
|
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
};
|
|
|
|
/**
|
|
* Gets the default type url for GirlBrief
|
|
* @function getTypeUrl
|
|
* @memberof cs.GirlBrief
|
|
* @static
|
|
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
* @returns {string} The default type url
|
|
*/
|
|
GirlBrief.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
if (typeUrlPrefix === undefined) {
|
|
typeUrlPrefix = "type.googleapis.com";
|
|
}
|
|
return typeUrlPrefix + "/cs.GirlBrief";
|
|
};
|
|
|
|
return GirlBrief;
|
|
})();
|
|
|
|
cs.GirlDetail = (function() {
|
|
|
|
/**
|
|
* Properties of a GirlDetail.
|
|
* @memberof cs
|
|
* @interface IGirlDetail
|
|
* @property {cs.IGirlBrief|null} [brief] GirlDetail brief
|
|
* @property {string|null} [desc] GirlDetail desc
|
|
* @property {Array.<string>|null} [pics] GirlDetail pics
|
|
*/
|
|
|
|
/**
|
|
* Constructs a new GirlDetail.
|
|
* @memberof cs
|
|
* @classdesc Represents a GirlDetail.
|
|
* @implements IGirlDetail
|
|
* @constructor
|
|
* @param {cs.IGirlDetail=} [properties] Properties to set
|
|
*/
|
|
function GirlDetail(properties) {
|
|
this.pics = [];
|
|
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]];
|
|
}
|
|
|
|
/**
|
|
* GirlDetail brief.
|
|
* @member {cs.IGirlBrief|null|undefined} brief
|
|
* @memberof cs.GirlDetail
|
|
* @instance
|
|
*/
|
|
GirlDetail.prototype.brief = null;
|
|
|
|
/**
|
|
* GirlDetail desc.
|
|
* @member {string} desc
|
|
* @memberof cs.GirlDetail
|
|
* @instance
|
|
*/
|
|
GirlDetail.prototype.desc = "";
|
|
|
|
/**
|
|
* GirlDetail pics.
|
|
* @member {Array.<string>} pics
|
|
* @memberof cs.GirlDetail
|
|
* @instance
|
|
*/
|
|
GirlDetail.prototype.pics = $util.emptyArray;
|
|
|
|
/**
|
|
* Creates a new GirlDetail instance using the specified properties.
|
|
* @function create
|
|
* @memberof cs.GirlDetail
|
|
* @static
|
|
* @param {cs.IGirlDetail=} [properties] Properties to set
|
|
* @returns {cs.GirlDetail} GirlDetail instance
|
|
*/
|
|
GirlDetail.create = function create(properties) {
|
|
return new GirlDetail(properties);
|
|
};
|
|
|
|
/**
|
|
* Encodes the specified GirlDetail message. Does not implicitly {@link cs.GirlDetail.verify|verify} messages.
|
|
* @function encode
|
|
* @memberof cs.GirlDetail
|
|
* @static
|
|
* @param {cs.IGirlDetail} message GirlDetail message or plain object to encode
|
|
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
* @returns {$protobuf.Writer} Writer
|
|
*/
|
|
GirlDetail.encode = function encode(message, writer) {
|
|
if (!writer)
|
|
writer = $Writer.create();
|
|
if (message.brief != null && Object.hasOwnProperty.call(message, "brief"))
|
|
$root.cs.GirlBrief.encode(message.brief, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
|
if (message.desc != null && Object.hasOwnProperty.call(message, "desc"))
|
|
writer.uint32(/* id 2, wireType 2 =*/18).string(message.desc);
|
|
if (message.pics != null && message.pics.length)
|
|
for (var i = 0; i < message.pics.length; ++i)
|
|
writer.uint32(/* id 3, wireType 2 =*/26).string(message.pics[i]);
|
|
return writer;
|
|
};
|
|
|
|
/**
|
|
* Encodes the specified GirlDetail message, length delimited. Does not implicitly {@link cs.GirlDetail.verify|verify} messages.
|
|
* @function encodeDelimited
|
|
* @memberof cs.GirlDetail
|
|
* @static
|
|
* @param {cs.IGirlDetail} message GirlDetail message or plain object to encode
|
|
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
* @returns {$protobuf.Writer} Writer
|
|
*/
|
|
GirlDetail.encodeDelimited = function encodeDelimited(message, writer) {
|
|
return this.encode(message, writer).ldelim();
|
|
};
|
|
|
|
/**
|
|
* Decodes a GirlDetail message from the specified reader or buffer.
|
|
* @function decode
|
|
* @memberof cs.GirlDetail
|
|
* @static
|
|
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
* @param {number} [length] Message length if known beforehand
|
|
* @returns {cs.GirlDetail} GirlDetail
|
|
* @throws {Error} If the payload is not a reader or valid buffer
|
|
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
*/
|
|
GirlDetail.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.GirlDetail();
|
|
while (reader.pos < end) {
|
|
var tag = reader.uint32();
|
|
if (tag === error)
|
|
break;
|
|
switch (tag >>> 3) {
|
|
case 1: {
|
|
message.brief = $root.cs.GirlBrief.decode(reader, reader.uint32());
|
|
break;
|
|
}
|
|
case 2: {
|
|
message.desc = reader.string();
|
|
break;
|
|
}
|
|
case 3: {
|
|
if (!(message.pics && message.pics.length))
|
|
message.pics = [];
|
|
message.pics.push(reader.string());
|
|
break;
|
|
}
|
|
default:
|
|
reader.skipType(tag & 7);
|
|
break;
|
|
}
|
|
}
|
|
return message;
|
|
};
|
|
|
|
/**
|
|
* Decodes a GirlDetail message from the specified reader or buffer, length delimited.
|
|
* @function decodeDelimited
|
|
* @memberof cs.GirlDetail
|
|
* @static
|
|
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
* @returns {cs.GirlDetail} GirlDetail
|
|
* @throws {Error} If the payload is not a reader or valid buffer
|
|
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
*/
|
|
GirlDetail.decodeDelimited = function decodeDelimited(reader) {
|
|
if (!(reader instanceof $Reader))
|
|
reader = new $Reader(reader);
|
|
return this.decode(reader, reader.uint32());
|
|
};
|
|
|
|
/**
|
|
* Verifies a GirlDetail message.
|
|
* @function verify
|
|
* @memberof cs.GirlDetail
|
|
* @static
|
|
* @param {Object.<string,*>} message Plain object to verify
|
|
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
*/
|
|
GirlDetail.verify = function verify(message) {
|
|
if (typeof message !== "object" || message === null)
|
|
return "object expected";
|
|
if (message.brief != null && message.hasOwnProperty("brief")) {
|
|
var error = $root.cs.GirlBrief.verify(message.brief);
|
|
if (error)
|
|
return "brief." + error;
|
|
}
|
|
if (message.desc != null && message.hasOwnProperty("desc"))
|
|
if (!$util.isString(message.desc))
|
|
return "desc: string expected";
|
|
if (message.pics != null && message.hasOwnProperty("pics")) {
|
|
if (!Array.isArray(message.pics))
|
|
return "pics: array expected";
|
|
for (var i = 0; i < message.pics.length; ++i)
|
|
if (!$util.isString(message.pics[i]))
|
|
return "pics: string[] expected";
|
|
}
|
|
return null;
|
|
};
|
|
|
|
/**
|
|
* Creates a GirlDetail message from a plain object. Also converts values to their respective internal types.
|
|
* @function fromObject
|
|
* @memberof cs.GirlDetail
|
|
* @static
|
|
* @param {Object.<string,*>} object Plain object
|
|
* @returns {cs.GirlDetail} GirlDetail
|
|
*/
|
|
GirlDetail.fromObject = function fromObject(object) {
|
|
if (object instanceof $root.cs.GirlDetail)
|
|
return object;
|
|
var message = new $root.cs.GirlDetail();
|
|
if (object.brief != null) {
|
|
if (typeof object.brief !== "object")
|
|
throw TypeError(".cs.GirlDetail.brief: object expected");
|
|
message.brief = $root.cs.GirlBrief.fromObject(object.brief);
|
|
}
|
|
if (object.desc != null)
|
|
message.desc = String(object.desc);
|
|
if (object.pics) {
|
|
if (!Array.isArray(object.pics))
|
|
throw TypeError(".cs.GirlDetail.pics: array expected");
|
|
message.pics = [];
|
|
for (var i = 0; i < object.pics.length; ++i)
|
|
message.pics[i] = String(object.pics[i]);
|
|
}
|
|
return message;
|
|
};
|
|
|
|
/**
|
|
* Creates a plain object from a GirlDetail message. Also converts values to other types if specified.
|
|
* @function toObject
|
|
* @memberof cs.GirlDetail
|
|
* @static
|
|
* @param {cs.GirlDetail} message GirlDetail
|
|
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
* @returns {Object.<string,*>} Plain object
|
|
*/
|
|
GirlDetail.toObject = function toObject(message, options) {
|
|
if (!options)
|
|
options = {};
|
|
var object = {};
|
|
if (options.arrays || options.defaults)
|
|
object.pics = [];
|
|
if (options.defaults) {
|
|
object.brief = null;
|
|
object.desc = "";
|
|
}
|
|
if (message.brief != null && message.hasOwnProperty("brief"))
|
|
object.brief = $root.cs.GirlBrief.toObject(message.brief, options);
|
|
if (message.desc != null && message.hasOwnProperty("desc"))
|
|
object.desc = message.desc;
|
|
if (message.pics && message.pics.length) {
|
|
object.pics = [];
|
|
for (var j = 0; j < message.pics.length; ++j)
|
|
object.pics[j] = message.pics[j];
|
|
}
|
|
return object;
|
|
};
|
|
|
|
/**
|
|
* Converts this GirlDetail to JSON.
|
|
* @function toJSON
|
|
* @memberof cs.GirlDetail
|
|
* @instance
|
|
* @returns {Object.<string,*>} JSON object
|
|
*/
|
|
GirlDetail.prototype.toJSON = function toJSON() {
|
|
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
};
|
|
|
|
/**
|
|
* Gets the default type url for GirlDetail
|
|
* @function getTypeUrl
|
|
* @memberof cs.GirlDetail
|
|
* @static
|
|
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
* @returns {string} The default type url
|
|
*/
|
|
GirlDetail.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
if (typeUrlPrefix === undefined) {
|
|
typeUrlPrefix = "type.googleapis.com";
|
|
}
|
|
return typeUrlPrefix + "/cs.GirlDetail";
|
|
};
|
|
|
|
return GirlDetail;
|
|
})();
|
|
|
|
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.<string,*>} 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.<string,*>} 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.<string,*>} Plain object
|
|
*/
|
|
CSDailyRecommendReq.toObject = function toObject() {
|
|
return {};
|
|
};
|
|
|
|
/**
|
|
* Converts this CSDailyRecommendReq to JSON.
|
|
* @function toJSON
|
|
* @memberof cs.CSDailyRecommendReq
|
|
* @instance
|
|
* @returns {Object.<string,*>} 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 {Array.<cs.IGirlBrief>|null} [girls] CSDailyRecommendRes girls
|
|
*/
|
|
|
|
/**
|
|
* Constructs a new CSDailyRecommendRes.
|
|
* @memberof cs
|
|
* @classdesc Represents a CSDailyRecommendRes.
|
|
* @implements ICSDailyRecommendRes
|
|
* @constructor
|
|
* @param {cs.ICSDailyRecommendRes=} [properties] Properties to set
|
|
*/
|
|
function CSDailyRecommendRes(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]];
|
|
}
|
|
|
|
/**
|
|
* CSDailyRecommendRes girls.
|
|
* @member {Array.<cs.IGirlBrief>} girls
|
|
* @memberof cs.CSDailyRecommendRes
|
|
* @instance
|
|
*/
|
|
CSDailyRecommendRes.prototype.girls = $util.emptyArray;
|
|
|
|
/**
|
|
* 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.girls != null && message.girls.length)
|
|
for (var i = 0; i < message.girls.length; ++i)
|
|
$root.cs.GirlBrief.encode(message.girls[i], 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: {
|
|
if (!(message.girls && message.girls.length))
|
|
message.girls = [];
|
|
message.girls.push($root.cs.GirlBrief.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.<string,*>} 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.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.GirlBrief.verify(message.girls[i]);
|
|
if (error)
|
|
return "girls." + 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.<string,*>} 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.girls) {
|
|
if (!Array.isArray(object.girls))
|
|
throw TypeError(".cs.CSDailyRecommendRes.girls: array expected");
|
|
message.girls = [];
|
|
for (var i = 0; i < object.girls.length; ++i) {
|
|
if (typeof object.girls[i] !== "object")
|
|
throw TypeError(".cs.CSDailyRecommendRes.girls: object expected");
|
|
message.girls[i] = $root.cs.GirlBrief.fromObject(object.girls[i]);
|
|
}
|
|
}
|
|
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.<string,*>} Plain object
|
|
*/
|
|
CSDailyRecommendRes.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.GirlBrief.toObject(message.girls[j], options);
|
|
}
|
|
return object;
|
|
};
|
|
|
|
/**
|
|
* Converts this CSDailyRecommendRes to JSON.
|
|
* @function toJSON
|
|
* @memberof cs.CSDailyRecommendRes
|
|
* @instance
|
|
* @returns {Object.<string,*>} 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.<string,*>} 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.<string,*>} 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.<string,*>} Plain object
|
|
*/
|
|
CSHallThemeReq.toObject = function toObject() {
|
|
return {};
|
|
};
|
|
|
|
/**
|
|
* Converts this CSHallThemeReq to JSON.
|
|
* @function toJSON
|
|
* @memberof cs.CSHallThemeReq
|
|
* @instance
|
|
* @returns {Object.<string,*>} 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.HallTheme = (function() {
|
|
|
|
/**
|
|
* Properties of a HallTheme.
|
|
* @memberof cs
|
|
* @interface IHallTheme
|
|
* @property {number|null} [id] HallTheme id
|
|
* @property {string|null} [key] HallTheme key
|
|
* @property {string|null} [name] HallTheme name
|
|
* @property {number|null} [category] HallTheme category
|
|
* @property {boolean|null} [isLock] HallTheme isLock
|
|
* @property {string|null} [path] HallTheme path
|
|
*/
|
|
|
|
/**
|
|
* Constructs a new HallTheme.
|
|
* @memberof cs
|
|
* @classdesc Represents a HallTheme.
|
|
* @implements IHallTheme
|
|
* @constructor
|
|
* @param {cs.IHallTheme=} [properties] Properties to set
|
|
*/
|
|
function HallTheme(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]];
|
|
}
|
|
|
|
/**
|
|
* HallTheme id.
|
|
* @member {number} id
|
|
* @memberof cs.HallTheme
|
|
* @instance
|
|
*/
|
|
HallTheme.prototype.id = 0;
|
|
|
|
/**
|
|
* HallTheme key.
|
|
* @member {string} key
|
|
* @memberof cs.HallTheme
|
|
* @instance
|
|
*/
|
|
HallTheme.prototype.key = "";
|
|
|
|
/**
|
|
* HallTheme name.
|
|
* @member {string} name
|
|
* @memberof cs.HallTheme
|
|
* @instance
|
|
*/
|
|
HallTheme.prototype.name = "";
|
|
|
|
/**
|
|
* HallTheme category.
|
|
* @member {number} category
|
|
* @memberof cs.HallTheme
|
|
* @instance
|
|
*/
|
|
HallTheme.prototype.category = 0;
|
|
|
|
/**
|
|
* HallTheme isLock.
|
|
* @member {boolean} isLock
|
|
* @memberof cs.HallTheme
|
|
* @instance
|
|
*/
|
|
HallTheme.prototype.isLock = false;
|
|
|
|
/**
|
|
* HallTheme path.
|
|
* @member {string} path
|
|
* @memberof cs.HallTheme
|
|
* @instance
|
|
*/
|
|
HallTheme.prototype.path = "";
|
|
|
|
/**
|
|
* Creates a new HallTheme instance using the specified properties.
|
|
* @function create
|
|
* @memberof cs.HallTheme
|
|
* @static
|
|
* @param {cs.IHallTheme=} [properties] Properties to set
|
|
* @returns {cs.HallTheme} HallTheme instance
|
|
*/
|
|
HallTheme.create = function create(properties) {
|
|
return new HallTheme(properties);
|
|
};
|
|
|
|
/**
|
|
* Encodes the specified HallTheme message. Does not implicitly {@link cs.HallTheme.verify|verify} messages.
|
|
* @function encode
|
|
* @memberof cs.HallTheme
|
|
* @static
|
|
* @param {cs.IHallTheme} message HallTheme message or plain object to encode
|
|
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
* @returns {$protobuf.Writer} Writer
|
|
*/
|
|
HallTheme.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.isLock != null && Object.hasOwnProperty.call(message, "isLock"))
|
|
writer.uint32(/* id 5, wireType 0 =*/40).bool(message.isLock);
|
|
if (message.path != null && Object.hasOwnProperty.call(message, "path"))
|
|
writer.uint32(/* id 6, wireType 2 =*/50).string(message.path);
|
|
return writer;
|
|
};
|
|
|
|
/**
|
|
* Encodes the specified HallTheme message, length delimited. Does not implicitly {@link cs.HallTheme.verify|verify} messages.
|
|
* @function encodeDelimited
|
|
* @memberof cs.HallTheme
|
|
* @static
|
|
* @param {cs.IHallTheme} message HallTheme message or plain object to encode
|
|
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
* @returns {$protobuf.Writer} Writer
|
|
*/
|
|
HallTheme.encodeDelimited = function encodeDelimited(message, writer) {
|
|
return this.encode(message, writer).ldelim();
|
|
};
|
|
|
|
/**
|
|
* Decodes a HallTheme message from the specified reader or buffer.
|
|
* @function decode
|
|
* @memberof cs.HallTheme
|
|
* @static
|
|
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
* @param {number} [length] Message length if known beforehand
|
|
* @returns {cs.HallTheme} HallTheme
|
|
* @throws {Error} If the payload is not a reader or valid buffer
|
|
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
*/
|
|
HallTheme.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.HallTheme();
|
|
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.isLock = reader.bool();
|
|
break;
|
|
}
|
|
case 6: {
|
|
message.path = reader.string();
|
|
break;
|
|
}
|
|
default:
|
|
reader.skipType(tag & 7);
|
|
break;
|
|
}
|
|
}
|
|
return message;
|
|
};
|
|
|
|
/**
|
|
* Decodes a HallTheme message from the specified reader or buffer, length delimited.
|
|
* @function decodeDelimited
|
|
* @memberof cs.HallTheme
|
|
* @static
|
|
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
* @returns {cs.HallTheme} HallTheme
|
|
* @throws {Error} If the payload is not a reader or valid buffer
|
|
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
*/
|
|
HallTheme.decodeDelimited = function decodeDelimited(reader) {
|
|
if (!(reader instanceof $Reader))
|
|
reader = new $Reader(reader);
|
|
return this.decode(reader, reader.uint32());
|
|
};
|
|
|
|
/**
|
|
* Verifies a HallTheme message.
|
|
* @function verify
|
|
* @memberof cs.HallTheme
|
|
* @static
|
|
* @param {Object.<string,*>} message Plain object to verify
|
|
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
*/
|
|
HallTheme.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"))
|
|
if (!$util.isInteger(message.category))
|
|
return "category: integer expected";
|
|
if (message.isLock != null && message.hasOwnProperty("isLock"))
|
|
if (typeof message.isLock !== "boolean")
|
|
return "isLock: boolean expected";
|
|
if (message.path != null && message.hasOwnProperty("path"))
|
|
if (!$util.isString(message.path))
|
|
return "path: string expected";
|
|
return null;
|
|
};
|
|
|
|
/**
|
|
* Creates a HallTheme message from a plain object. Also converts values to their respective internal types.
|
|
* @function fromObject
|
|
* @memberof cs.HallTheme
|
|
* @static
|
|
* @param {Object.<string,*>} object Plain object
|
|
* @returns {cs.HallTheme} HallTheme
|
|
*/
|
|
HallTheme.fromObject = function fromObject(object) {
|
|
if (object instanceof $root.cs.HallTheme)
|
|
return object;
|
|
var message = new $root.cs.HallTheme();
|
|
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);
|
|
if (object.category != null)
|
|
message.category = object.category | 0;
|
|
if (object.isLock != null)
|
|
message.isLock = Boolean(object.isLock);
|
|
if (object.path != null)
|
|
message.path = String(object.path);
|
|
return message;
|
|
};
|
|
|
|
/**
|
|
* Creates a plain object from a HallTheme message. Also converts values to other types if specified.
|
|
* @function toObject
|
|
* @memberof cs.HallTheme
|
|
* @static
|
|
* @param {cs.HallTheme} message HallTheme
|
|
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
* @returns {Object.<string,*>} Plain object
|
|
*/
|
|
HallTheme.toObject = function toObject(message, options) {
|
|
if (!options)
|
|
options = {};
|
|
var object = {};
|
|
if (options.defaults) {
|
|
object.id = 0;
|
|
object.key = "";
|
|
object.name = "";
|
|
object.category = 0;
|
|
object.isLock = 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 = message.category;
|
|
if (message.isLock != null && message.hasOwnProperty("isLock"))
|
|
object.isLock = message.isLock;
|
|
if (message.path != null && message.hasOwnProperty("path"))
|
|
object.path = message.path;
|
|
return object;
|
|
};
|
|
|
|
/**
|
|
* Converts this HallTheme to JSON.
|
|
* @function toJSON
|
|
* @memberof cs.HallTheme
|
|
* @instance
|
|
* @returns {Object.<string,*>} JSON object
|
|
*/
|
|
HallTheme.prototype.toJSON = function toJSON() {
|
|
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
};
|
|
|
|
/**
|
|
* Gets the default type url for HallTheme
|
|
* @function getTypeUrl
|
|
* @memberof cs.HallTheme
|
|
* @static
|
|
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
* @returns {string} The default type url
|
|
*/
|
|
HallTheme.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
if (typeUrlPrefix === undefined) {
|
|
typeUrlPrefix = "type.googleapis.com";
|
|
}
|
|
return typeUrlPrefix + "/cs.HallTheme";
|
|
};
|
|
|
|
return HallTheme;
|
|
})();
|
|
|
|
cs.CSHallThemeRes = (function() {
|
|
|
|
/**
|
|
* Properties of a CSHallThemeRes.
|
|
* @memberof cs
|
|
* @interface ICSHallThemeRes
|
|
* @property {Array.<cs.IHallTheme>|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.<cs.IHallTheme>} 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.HallTheme.encode(message.themes[i], writer.uint32(/* id 2, wireType 2 =*/18).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 2: {
|
|
if (!(message.themes && message.themes.length))
|
|
message.themes = [];
|
|
message.themes.push($root.cs.HallTheme.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.<string,*>} 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.HallTheme.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.<string,*>} 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.HallTheme.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.<string,*>} 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.HallTheme.toObject(message.themes[j], options);
|
|
}
|
|
return object;
|
|
};
|
|
|
|
/**
|
|
* Converts this CSHallThemeRes to JSON.
|
|
* @function toJSON
|
|
* @memberof cs.CSHallThemeRes
|
|
* @instance
|
|
* @returns {Object.<string,*>} 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.CSGetGirlListReq = (function() {
|
|
|
|
/**
|
|
* Properties of a CSGetGirlListReq.
|
|
* @memberof cs
|
|
* @interface ICSGetGirlListReq
|
|
* @property {string|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 {string} category
|
|
* @memberof cs.CSGetGirlListReq
|
|
* @instance
|
|
*/
|
|
CSGetGirlListReq.prototype.category = "";
|
|
|
|
/**
|
|
* 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 2 =*/10).string(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.string();
|
|
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.<string,*>} 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.isString(message.category))
|
|
return "category: string 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.<string,*>} 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 = String(object.category);
|
|
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.<string,*>} Plain object
|
|
*/
|
|
CSGetGirlListReq.toObject = function toObject(message, options) {
|
|
if (!options)
|
|
options = {};
|
|
var object = {};
|
|
if (options.defaults) {
|
|
object.category = "";
|
|
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.<string,*>} 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.<cs.IGirlBrief>|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.<cs.IGirlBrief>} 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.GirlBrief.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.GirlBrief.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.<string,*>} 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.GirlBrief.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.<string,*>} 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.GirlBrief.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.<string,*>} 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.GirlBrief.toObject(message.girls[j], options);
|
|
}
|
|
return object;
|
|
};
|
|
|
|
/**
|
|
* Converts this CSGetGirlListRes to JSON.
|
|
* @function toJSON
|
|
* @memberof cs.CSGetGirlListRes
|
|
* @instance
|
|
* @returns {Object.<string,*>} 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.<string,*>} 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.<string,*>} 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.<string,*>} 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.<string,*>} 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.IGirlDetail|null} [detail] CSGetGirlDetailRes detail
|
|
*/
|
|
|
|
/**
|
|
* 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 detail.
|
|
* @member {cs.IGirlDetail|null|undefined} detail
|
|
* @memberof cs.CSGetGirlDetailRes
|
|
* @instance
|
|
*/
|
|
CSGetGirlDetailRes.prototype.detail = 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.detail != null && Object.hasOwnProperty.call(message, "detail"))
|
|
$root.cs.GirlDetail.encode(message.detail, 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.detail = $root.cs.GirlDetail.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.<string,*>} 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.detail != null && message.hasOwnProperty("detail")) {
|
|
var error = $root.cs.GirlDetail.verify(message.detail);
|
|
if (error)
|
|
return "detail." + 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.<string,*>} 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.detail != null) {
|
|
if (typeof object.detail !== "object")
|
|
throw TypeError(".cs.CSGetGirlDetailRes.detail: object expected");
|
|
message.detail = $root.cs.GirlDetail.fromObject(object.detail);
|
|
}
|
|
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.<string,*>} Plain object
|
|
*/
|
|
CSGetGirlDetailRes.toObject = function toObject(message, options) {
|
|
if (!options)
|
|
options = {};
|
|
var object = {};
|
|
if (options.defaults)
|
|
object.detail = null;
|
|
if (message.detail != null && message.hasOwnProperty("detail"))
|
|
object.detail = $root.cs.GirlDetail.toObject(message.detail, options);
|
|
return object;
|
|
};
|
|
|
|
/**
|
|
* Converts this CSGetGirlDetailRes to JSON.
|
|
* @function toJSON
|
|
* @memberof cs.CSGetGirlDetailRes
|
|
* @instance
|
|
* @returns {Object.<string,*>} 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.Diamond = (function() {
|
|
|
|
/**
|
|
* Properties of a Diamond.
|
|
* @memberof cs
|
|
* @interface IDiamond
|
|
* @property {number|null} [id] Diamond id
|
|
* @property {string|null} [name] Diamond name
|
|
* @property {string|null} [price] Diamond price
|
|
* @property {number|null} [diamonCount] Diamond diamonCount
|
|
*/
|
|
|
|
/**
|
|
* Constructs a new Diamond.
|
|
* @memberof cs
|
|
* @classdesc Represents a Diamond.
|
|
* @implements IDiamond
|
|
* @constructor
|
|
* @param {cs.IDiamond=} [properties] Properties to set
|
|
*/
|
|
function Diamond(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]];
|
|
}
|
|
|
|
/**
|
|
* Diamond id.
|
|
* @member {number} id
|
|
* @memberof cs.Diamond
|
|
* @instance
|
|
*/
|
|
Diamond.prototype.id = 0;
|
|
|
|
/**
|
|
* Diamond name.
|
|
* @member {string} name
|
|
* @memberof cs.Diamond
|
|
* @instance
|
|
*/
|
|
Diamond.prototype.name = "";
|
|
|
|
/**
|
|
* Diamond price.
|
|
* @member {string} price
|
|
* @memberof cs.Diamond
|
|
* @instance
|
|
*/
|
|
Diamond.prototype.price = "";
|
|
|
|
/**
|
|
* Diamond diamonCount.
|
|
* @member {number} diamonCount
|
|
* @memberof cs.Diamond
|
|
* @instance
|
|
*/
|
|
Diamond.prototype.diamonCount = 0;
|
|
|
|
/**
|
|
* Creates a new Diamond instance using the specified properties.
|
|
* @function create
|
|
* @memberof cs.Diamond
|
|
* @static
|
|
* @param {cs.IDiamond=} [properties] Properties to set
|
|
* @returns {cs.Diamond} Diamond instance
|
|
*/
|
|
Diamond.create = function create(properties) {
|
|
return new Diamond(properties);
|
|
};
|
|
|
|
/**
|
|
* Encodes the specified Diamond message. Does not implicitly {@link cs.Diamond.verify|verify} messages.
|
|
* @function encode
|
|
* @memberof cs.Diamond
|
|
* @static
|
|
* @param {cs.IDiamond} message Diamond message or plain object to encode
|
|
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
* @returns {$protobuf.Writer} Writer
|
|
*/
|
|
Diamond.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.diamonCount != null && Object.hasOwnProperty.call(message, "diamonCount"))
|
|
writer.uint32(/* id 3, wireType 0 =*/24).int32(message.diamonCount);
|
|
if (message.price != null && Object.hasOwnProperty.call(message, "price"))
|
|
writer.uint32(/* id 4, wireType 2 =*/34).string(message.price);
|
|
return writer;
|
|
};
|
|
|
|
/**
|
|
* Encodes the specified Diamond message, length delimited. Does not implicitly {@link cs.Diamond.verify|verify} messages.
|
|
* @function encodeDelimited
|
|
* @memberof cs.Diamond
|
|
* @static
|
|
* @param {cs.IDiamond} message Diamond message or plain object to encode
|
|
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
* @returns {$protobuf.Writer} Writer
|
|
*/
|
|
Diamond.encodeDelimited = function encodeDelimited(message, writer) {
|
|
return this.encode(message, writer).ldelim();
|
|
};
|
|
|
|
/**
|
|
* Decodes a Diamond message from the specified reader or buffer.
|
|
* @function decode
|
|
* @memberof cs.Diamond
|
|
* @static
|
|
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
* @param {number} [length] Message length if known beforehand
|
|
* @returns {cs.Diamond} Diamond
|
|
* @throws {Error} If the payload is not a reader or valid buffer
|
|
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
*/
|
|
Diamond.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.Diamond();
|
|
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 4: {
|
|
message.price = reader.string();
|
|
break;
|
|
}
|
|
case 3: {
|
|
message.diamonCount = reader.int32();
|
|
break;
|
|
}
|
|
default:
|
|
reader.skipType(tag & 7);
|
|
break;
|
|
}
|
|
}
|
|
return message;
|
|
};
|
|
|
|
/**
|
|
* Decodes a Diamond message from the specified reader or buffer, length delimited.
|
|
* @function decodeDelimited
|
|
* @memberof cs.Diamond
|
|
* @static
|
|
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
* @returns {cs.Diamond} Diamond
|
|
* @throws {Error} If the payload is not a reader or valid buffer
|
|
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
*/
|
|
Diamond.decodeDelimited = function decodeDelimited(reader) {
|
|
if (!(reader instanceof $Reader))
|
|
reader = new $Reader(reader);
|
|
return this.decode(reader, reader.uint32());
|
|
};
|
|
|
|
/**
|
|
* Verifies a Diamond message.
|
|
* @function verify
|
|
* @memberof cs.Diamond
|
|
* @static
|
|
* @param {Object.<string,*>} message Plain object to verify
|
|
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
*/
|
|
Diamond.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.price != null && message.hasOwnProperty("price"))
|
|
if (!$util.isString(message.price))
|
|
return "price: string expected";
|
|
if (message.diamonCount != null && message.hasOwnProperty("diamonCount"))
|
|
if (!$util.isInteger(message.diamonCount))
|
|
return "diamonCount: integer expected";
|
|
return null;
|
|
};
|
|
|
|
/**
|
|
* Creates a Diamond message from a plain object. Also converts values to their respective internal types.
|
|
* @function fromObject
|
|
* @memberof cs.Diamond
|
|
* @static
|
|
* @param {Object.<string,*>} object Plain object
|
|
* @returns {cs.Diamond} Diamond
|
|
*/
|
|
Diamond.fromObject = function fromObject(object) {
|
|
if (object instanceof $root.cs.Diamond)
|
|
return object;
|
|
var message = new $root.cs.Diamond();
|
|
if (object.id != null)
|
|
message.id = object.id | 0;
|
|
if (object.name != null)
|
|
message.name = String(object.name);
|
|
if (object.price != null)
|
|
message.price = String(object.price);
|
|
if (object.diamonCount != null)
|
|
message.diamonCount = object.diamonCount | 0;
|
|
return message;
|
|
};
|
|
|
|
/**
|
|
* Creates a plain object from a Diamond message. Also converts values to other types if specified.
|
|
* @function toObject
|
|
* @memberof cs.Diamond
|
|
* @static
|
|
* @param {cs.Diamond} message Diamond
|
|
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
* @returns {Object.<string,*>} Plain object
|
|
*/
|
|
Diamond.toObject = function toObject(message, options) {
|
|
if (!options)
|
|
options = {};
|
|
var object = {};
|
|
if (options.defaults) {
|
|
object.id = 0;
|
|
object.name = "";
|
|
object.diamonCount = 0;
|
|
object.price = "";
|
|
}
|
|
if (message.id != null && message.hasOwnProperty("id"))
|
|
object.id = message.id;
|
|
if (message.name != null && message.hasOwnProperty("name"))
|
|
object.name = message.name;
|
|
if (message.diamonCount != null && message.hasOwnProperty("diamonCount"))
|
|
object.diamonCount = message.diamonCount;
|
|
if (message.price != null && message.hasOwnProperty("price"))
|
|
object.price = message.price;
|
|
return object;
|
|
};
|
|
|
|
/**
|
|
* Converts this Diamond to JSON.
|
|
* @function toJSON
|
|
* @memberof cs.Diamond
|
|
* @instance
|
|
* @returns {Object.<string,*>} JSON object
|
|
*/
|
|
Diamond.prototype.toJSON = function toJSON() {
|
|
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
};
|
|
|
|
/**
|
|
* Gets the default type url for Diamond
|
|
* @function getTypeUrl
|
|
* @memberof cs.Diamond
|
|
* @static
|
|
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
* @returns {string} The default type url
|
|
*/
|
|
Diamond.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
if (typeUrlPrefix === undefined) {
|
|
typeUrlPrefix = "type.googleapis.com";
|
|
}
|
|
return typeUrlPrefix + "/cs.Diamond";
|
|
};
|
|
|
|
return Diamond;
|
|
})();
|
|
|
|
cs.Vip = (function() {
|
|
|
|
/**
|
|
* Properties of a Vip.
|
|
* @memberof cs
|
|
* @interface IVip
|
|
* @property {number|null} [id] Vip id
|
|
* @property {string|null} [name] Vip name
|
|
* @property {string|null} [desc] Vip desc
|
|
* @property {string|null} [price] Vip price
|
|
*/
|
|
|
|
/**
|
|
* Constructs a new Vip.
|
|
* @memberof cs
|
|
* @classdesc Represents a Vip.
|
|
* @implements IVip
|
|
* @constructor
|
|
* @param {cs.IVip=} [properties] Properties to set
|
|
*/
|
|
function Vip(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]];
|
|
}
|
|
|
|
/**
|
|
* Vip id.
|
|
* @member {number} id
|
|
* @memberof cs.Vip
|
|
* @instance
|
|
*/
|
|
Vip.prototype.id = 0;
|
|
|
|
/**
|
|
* Vip name.
|
|
* @member {string} name
|
|
* @memberof cs.Vip
|
|
* @instance
|
|
*/
|
|
Vip.prototype.name = "";
|
|
|
|
/**
|
|
* Vip desc.
|
|
* @member {string} desc
|
|
* @memberof cs.Vip
|
|
* @instance
|
|
*/
|
|
Vip.prototype.desc = "";
|
|
|
|
/**
|
|
* Vip price.
|
|
* @member {string} price
|
|
* @memberof cs.Vip
|
|
* @instance
|
|
*/
|
|
Vip.prototype.price = "";
|
|
|
|
/**
|
|
* Creates a new Vip instance using the specified properties.
|
|
* @function create
|
|
* @memberof cs.Vip
|
|
* @static
|
|
* @param {cs.IVip=} [properties] Properties to set
|
|
* @returns {cs.Vip} Vip instance
|
|
*/
|
|
Vip.create = function create(properties) {
|
|
return new Vip(properties);
|
|
};
|
|
|
|
/**
|
|
* Encodes the specified Vip message. Does not implicitly {@link cs.Vip.verify|verify} messages.
|
|
* @function encode
|
|
* @memberof cs.Vip
|
|
* @static
|
|
* @param {cs.IVip} message Vip message or plain object to encode
|
|
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
* @returns {$protobuf.Writer} Writer
|
|
*/
|
|
Vip.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.desc != null && Object.hasOwnProperty.call(message, "desc"))
|
|
writer.uint32(/* id 3, wireType 2 =*/26).string(message.desc);
|
|
if (message.price != null && Object.hasOwnProperty.call(message, "price"))
|
|
writer.uint32(/* id 4, wireType 2 =*/34).string(message.price);
|
|
return writer;
|
|
};
|
|
|
|
/**
|
|
* Encodes the specified Vip message, length delimited. Does not implicitly {@link cs.Vip.verify|verify} messages.
|
|
* @function encodeDelimited
|
|
* @memberof cs.Vip
|
|
* @static
|
|
* @param {cs.IVip} message Vip message or plain object to encode
|
|
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
* @returns {$protobuf.Writer} Writer
|
|
*/
|
|
Vip.encodeDelimited = function encodeDelimited(message, writer) {
|
|
return this.encode(message, writer).ldelim();
|
|
};
|
|
|
|
/**
|
|
* Decodes a Vip message from the specified reader or buffer.
|
|
* @function decode
|
|
* @memberof cs.Vip
|
|
* @static
|
|
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
* @param {number} [length] Message length if known beforehand
|
|
* @returns {cs.Vip} Vip
|
|
* @throws {Error} If the payload is not a reader or valid buffer
|
|
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
*/
|
|
Vip.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.Vip();
|
|
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.desc = reader.string();
|
|
break;
|
|
}
|
|
case 4: {
|
|
message.price = reader.string();
|
|
break;
|
|
}
|
|
default:
|
|
reader.skipType(tag & 7);
|
|
break;
|
|
}
|
|
}
|
|
return message;
|
|
};
|
|
|
|
/**
|
|
* Decodes a Vip message from the specified reader or buffer, length delimited.
|
|
* @function decodeDelimited
|
|
* @memberof cs.Vip
|
|
* @static
|
|
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
* @returns {cs.Vip} Vip
|
|
* @throws {Error} If the payload is not a reader or valid buffer
|
|
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
*/
|
|
Vip.decodeDelimited = function decodeDelimited(reader) {
|
|
if (!(reader instanceof $Reader))
|
|
reader = new $Reader(reader);
|
|
return this.decode(reader, reader.uint32());
|
|
};
|
|
|
|
/**
|
|
* Verifies a Vip message.
|
|
* @function verify
|
|
* @memberof cs.Vip
|
|
* @static
|
|
* @param {Object.<string,*>} message Plain object to verify
|
|
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
*/
|
|
Vip.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.desc != null && message.hasOwnProperty("desc"))
|
|
if (!$util.isString(message.desc))
|
|
return "desc: string expected";
|
|
if (message.price != null && message.hasOwnProperty("price"))
|
|
if (!$util.isString(message.price))
|
|
return "price: string expected";
|
|
return null;
|
|
};
|
|
|
|
/**
|
|
* Creates a Vip message from a plain object. Also converts values to their respective internal types.
|
|
* @function fromObject
|
|
* @memberof cs.Vip
|
|
* @static
|
|
* @param {Object.<string,*>} object Plain object
|
|
* @returns {cs.Vip} Vip
|
|
*/
|
|
Vip.fromObject = function fromObject(object) {
|
|
if (object instanceof $root.cs.Vip)
|
|
return object;
|
|
var message = new $root.cs.Vip();
|
|
if (object.id != null)
|
|
message.id = object.id | 0;
|
|
if (object.name != null)
|
|
message.name = String(object.name);
|
|
if (object.desc != null)
|
|
message.desc = String(object.desc);
|
|
if (object.price != null)
|
|
message.price = String(object.price);
|
|
return message;
|
|
};
|
|
|
|
/**
|
|
* Creates a plain object from a Vip message. Also converts values to other types if specified.
|
|
* @function toObject
|
|
* @memberof cs.Vip
|
|
* @static
|
|
* @param {cs.Vip} message Vip
|
|
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
* @returns {Object.<string,*>} Plain object
|
|
*/
|
|
Vip.toObject = function toObject(message, options) {
|
|
if (!options)
|
|
options = {};
|
|
var object = {};
|
|
if (options.defaults) {
|
|
object.id = 0;
|
|
object.name = "";
|
|
object.desc = "";
|
|
object.price = "";
|
|
}
|
|
if (message.id != null && message.hasOwnProperty("id"))
|
|
object.id = message.id;
|
|
if (message.name != null && message.hasOwnProperty("name"))
|
|
object.name = message.name;
|
|
if (message.desc != null && message.hasOwnProperty("desc"))
|
|
object.desc = message.desc;
|
|
if (message.price != null && message.hasOwnProperty("price"))
|
|
object.price = message.price;
|
|
return object;
|
|
};
|
|
|
|
/**
|
|
* Converts this Vip to JSON.
|
|
* @function toJSON
|
|
* @memberof cs.Vip
|
|
* @instance
|
|
* @returns {Object.<string,*>} JSON object
|
|
*/
|
|
Vip.prototype.toJSON = function toJSON() {
|
|
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
};
|
|
|
|
/**
|
|
* Gets the default type url for Vip
|
|
* @function getTypeUrl
|
|
* @memberof cs.Vip
|
|
* @static
|
|
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
* @returns {string} The default type url
|
|
*/
|
|
Vip.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
if (typeUrlPrefix === undefined) {
|
|
typeUrlPrefix = "type.googleapis.com";
|
|
}
|
|
return typeUrlPrefix + "/cs.Vip";
|
|
};
|
|
|
|
return Vip;
|
|
})();
|
|
|
|
cs.CSGetShopReq = (function() {
|
|
|
|
/**
|
|
* Properties of a CSGetShopReq.
|
|
* @memberof cs
|
|
* @interface ICSGetShopReq
|
|
*/
|
|
|
|
/**
|
|
* Constructs a new CSGetShopReq.
|
|
* @memberof cs
|
|
* @classdesc Represents a CSGetShopReq.
|
|
* @implements ICSGetShopReq
|
|
* @constructor
|
|
* @param {cs.ICSGetShopReq=} [properties] Properties to set
|
|
*/
|
|
function CSGetShopReq(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 CSGetShopReq instance using the specified properties.
|
|
* @function create
|
|
* @memberof cs.CSGetShopReq
|
|
* @static
|
|
* @param {cs.ICSGetShopReq=} [properties] Properties to set
|
|
* @returns {cs.CSGetShopReq} CSGetShopReq instance
|
|
*/
|
|
CSGetShopReq.create = function create(properties) {
|
|
return new CSGetShopReq(properties);
|
|
};
|
|
|
|
/**
|
|
* Encodes the specified CSGetShopReq message. Does not implicitly {@link cs.CSGetShopReq.verify|verify} messages.
|
|
* @function encode
|
|
* @memberof cs.CSGetShopReq
|
|
* @static
|
|
* @param {cs.ICSGetShopReq} message CSGetShopReq message or plain object to encode
|
|
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
* @returns {$protobuf.Writer} Writer
|
|
*/
|
|
CSGetShopReq.encode = function encode(message, writer) {
|
|
if (!writer)
|
|
writer = $Writer.create();
|
|
return writer;
|
|
};
|
|
|
|
/**
|
|
* Encodes the specified CSGetShopReq message, length delimited. Does not implicitly {@link cs.CSGetShopReq.verify|verify} messages.
|
|
* @function encodeDelimited
|
|
* @memberof cs.CSGetShopReq
|
|
* @static
|
|
* @param {cs.ICSGetShopReq} message CSGetShopReq message or plain object to encode
|
|
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
* @returns {$protobuf.Writer} Writer
|
|
*/
|
|
CSGetShopReq.encodeDelimited = function encodeDelimited(message, writer) {
|
|
return this.encode(message, writer).ldelim();
|
|
};
|
|
|
|
/**
|
|
* Decodes a CSGetShopReq message from the specified reader or buffer.
|
|
* @function decode
|
|
* @memberof cs.CSGetShopReq
|
|
* @static
|
|
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
* @param {number} [length] Message length if known beforehand
|
|
* @returns {cs.CSGetShopReq} CSGetShopReq
|
|
* @throws {Error} If the payload is not a reader or valid buffer
|
|
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
*/
|
|
CSGetShopReq.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.CSGetShopReq();
|
|
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 CSGetShopReq message from the specified reader or buffer, length delimited.
|
|
* @function decodeDelimited
|
|
* @memberof cs.CSGetShopReq
|
|
* @static
|
|
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
* @returns {cs.CSGetShopReq} CSGetShopReq
|
|
* @throws {Error} If the payload is not a reader or valid buffer
|
|
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
*/
|
|
CSGetShopReq.decodeDelimited = function decodeDelimited(reader) {
|
|
if (!(reader instanceof $Reader))
|
|
reader = new $Reader(reader);
|
|
return this.decode(reader, reader.uint32());
|
|
};
|
|
|
|
/**
|
|
* Verifies a CSGetShopReq message.
|
|
* @function verify
|
|
* @memberof cs.CSGetShopReq
|
|
* @static
|
|
* @param {Object.<string,*>} message Plain object to verify
|
|
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
*/
|
|
CSGetShopReq.verify = function verify(message) {
|
|
if (typeof message !== "object" || message === null)
|
|
return "object expected";
|
|
return null;
|
|
};
|
|
|
|
/**
|
|
* Creates a CSGetShopReq message from a plain object. Also converts values to their respective internal types.
|
|
* @function fromObject
|
|
* @memberof cs.CSGetShopReq
|
|
* @static
|
|
* @param {Object.<string,*>} object Plain object
|
|
* @returns {cs.CSGetShopReq} CSGetShopReq
|
|
*/
|
|
CSGetShopReq.fromObject = function fromObject(object) {
|
|
if (object instanceof $root.cs.CSGetShopReq)
|
|
return object;
|
|
return new $root.cs.CSGetShopReq();
|
|
};
|
|
|
|
/**
|
|
* Creates a plain object from a CSGetShopReq message. Also converts values to other types if specified.
|
|
* @function toObject
|
|
* @memberof cs.CSGetShopReq
|
|
* @static
|
|
* @param {cs.CSGetShopReq} message CSGetShopReq
|
|
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
* @returns {Object.<string,*>} Plain object
|
|
*/
|
|
CSGetShopReq.toObject = function toObject() {
|
|
return {};
|
|
};
|
|
|
|
/**
|
|
* Converts this CSGetShopReq to JSON.
|
|
* @function toJSON
|
|
* @memberof cs.CSGetShopReq
|
|
* @instance
|
|
* @returns {Object.<string,*>} JSON object
|
|
*/
|
|
CSGetShopReq.prototype.toJSON = function toJSON() {
|
|
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
};
|
|
|
|
/**
|
|
* Gets the default type url for CSGetShopReq
|
|
* @function getTypeUrl
|
|
* @memberof cs.CSGetShopReq
|
|
* @static
|
|
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
* @returns {string} The default type url
|
|
*/
|
|
CSGetShopReq.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
if (typeUrlPrefix === undefined) {
|
|
typeUrlPrefix = "type.googleapis.com";
|
|
}
|
|
return typeUrlPrefix + "/cs.CSGetShopReq";
|
|
};
|
|
|
|
return CSGetShopReq;
|
|
})();
|
|
|
|
cs.CSGetShopRes = (function() {
|
|
|
|
/**
|
|
* Properties of a CSGetShopRes.
|
|
* @memberof cs
|
|
* @interface ICSGetShopRes
|
|
* @property {Array.<cs.IDiamond>|null} [diamonds] CSGetShopRes diamonds
|
|
* @property {Array.<cs.IVip>|null} [vips] CSGetShopRes vips
|
|
*/
|
|
|
|
/**
|
|
* Constructs a new CSGetShopRes.
|
|
* @memberof cs
|
|
* @classdesc Represents a CSGetShopRes.
|
|
* @implements ICSGetShopRes
|
|
* @constructor
|
|
* @param {cs.ICSGetShopRes=} [properties] Properties to set
|
|
*/
|
|
function CSGetShopRes(properties) {
|
|
this.diamonds = [];
|
|
this.vips = [];
|
|
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]];
|
|
}
|
|
|
|
/**
|
|
* CSGetShopRes diamonds.
|
|
* @member {Array.<cs.IDiamond>} diamonds
|
|
* @memberof cs.CSGetShopRes
|
|
* @instance
|
|
*/
|
|
CSGetShopRes.prototype.diamonds = $util.emptyArray;
|
|
|
|
/**
|
|
* CSGetShopRes vips.
|
|
* @member {Array.<cs.IVip>} vips
|
|
* @memberof cs.CSGetShopRes
|
|
* @instance
|
|
*/
|
|
CSGetShopRes.prototype.vips = $util.emptyArray;
|
|
|
|
/**
|
|
* Creates a new CSGetShopRes instance using the specified properties.
|
|
* @function create
|
|
* @memberof cs.CSGetShopRes
|
|
* @static
|
|
* @param {cs.ICSGetShopRes=} [properties] Properties to set
|
|
* @returns {cs.CSGetShopRes} CSGetShopRes instance
|
|
*/
|
|
CSGetShopRes.create = function create(properties) {
|
|
return new CSGetShopRes(properties);
|
|
};
|
|
|
|
/**
|
|
* Encodes the specified CSGetShopRes message. Does not implicitly {@link cs.CSGetShopRes.verify|verify} messages.
|
|
* @function encode
|
|
* @memberof cs.CSGetShopRes
|
|
* @static
|
|
* @param {cs.ICSGetShopRes} message CSGetShopRes message or plain object to encode
|
|
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
* @returns {$protobuf.Writer} Writer
|
|
*/
|
|
CSGetShopRes.encode = function encode(message, writer) {
|
|
if (!writer)
|
|
writer = $Writer.create();
|
|
if (message.diamonds != null && message.diamonds.length)
|
|
for (var i = 0; i < message.diamonds.length; ++i)
|
|
$root.cs.Diamond.encode(message.diamonds[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
|
if (message.vips != null && message.vips.length)
|
|
for (var i = 0; i < message.vips.length; ++i)
|
|
$root.cs.Vip.encode(message.vips[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
|
|
return writer;
|
|
};
|
|
|
|
/**
|
|
* Encodes the specified CSGetShopRes message, length delimited. Does not implicitly {@link cs.CSGetShopRes.verify|verify} messages.
|
|
* @function encodeDelimited
|
|
* @memberof cs.CSGetShopRes
|
|
* @static
|
|
* @param {cs.ICSGetShopRes} message CSGetShopRes message or plain object to encode
|
|
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
* @returns {$protobuf.Writer} Writer
|
|
*/
|
|
CSGetShopRes.encodeDelimited = function encodeDelimited(message, writer) {
|
|
return this.encode(message, writer).ldelim();
|
|
};
|
|
|
|
/**
|
|
* Decodes a CSGetShopRes message from the specified reader or buffer.
|
|
* @function decode
|
|
* @memberof cs.CSGetShopRes
|
|
* @static
|
|
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
* @param {number} [length] Message length if known beforehand
|
|
* @returns {cs.CSGetShopRes} CSGetShopRes
|
|
* @throws {Error} If the payload is not a reader or valid buffer
|
|
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
*/
|
|
CSGetShopRes.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.CSGetShopRes();
|
|
while (reader.pos < end) {
|
|
var tag = reader.uint32();
|
|
if (tag === error)
|
|
break;
|
|
switch (tag >>> 3) {
|
|
case 1: {
|
|
if (!(message.diamonds && message.diamonds.length))
|
|
message.diamonds = [];
|
|
message.diamonds.push($root.cs.Diamond.decode(reader, reader.uint32()));
|
|
break;
|
|
}
|
|
case 2: {
|
|
if (!(message.vips && message.vips.length))
|
|
message.vips = [];
|
|
message.vips.push($root.cs.Vip.decode(reader, reader.uint32()));
|
|
break;
|
|
}
|
|
default:
|
|
reader.skipType(tag & 7);
|
|
break;
|
|
}
|
|
}
|
|
return message;
|
|
};
|
|
|
|
/**
|
|
* Decodes a CSGetShopRes message from the specified reader or buffer, length delimited.
|
|
* @function decodeDelimited
|
|
* @memberof cs.CSGetShopRes
|
|
* @static
|
|
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
* @returns {cs.CSGetShopRes} CSGetShopRes
|
|
* @throws {Error} If the payload is not a reader or valid buffer
|
|
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
*/
|
|
CSGetShopRes.decodeDelimited = function decodeDelimited(reader) {
|
|
if (!(reader instanceof $Reader))
|
|
reader = new $Reader(reader);
|
|
return this.decode(reader, reader.uint32());
|
|
};
|
|
|
|
/**
|
|
* Verifies a CSGetShopRes message.
|
|
* @function verify
|
|
* @memberof cs.CSGetShopRes
|
|
* @static
|
|
* @param {Object.<string,*>} message Plain object to verify
|
|
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
*/
|
|
CSGetShopRes.verify = function verify(message) {
|
|
if (typeof message !== "object" || message === null)
|
|
return "object expected";
|
|
if (message.diamonds != null && message.hasOwnProperty("diamonds")) {
|
|
if (!Array.isArray(message.diamonds))
|
|
return "diamonds: array expected";
|
|
for (var i = 0; i < message.diamonds.length; ++i) {
|
|
var error = $root.cs.Diamond.verify(message.diamonds[i]);
|
|
if (error)
|
|
return "diamonds." + error;
|
|
}
|
|
}
|
|
if (message.vips != null && message.hasOwnProperty("vips")) {
|
|
if (!Array.isArray(message.vips))
|
|
return "vips: array expected";
|
|
for (var i = 0; i < message.vips.length; ++i) {
|
|
var error = $root.cs.Vip.verify(message.vips[i]);
|
|
if (error)
|
|
return "vips." + error;
|
|
}
|
|
}
|
|
return null;
|
|
};
|
|
|
|
/**
|
|
* Creates a CSGetShopRes message from a plain object. Also converts values to their respective internal types.
|
|
* @function fromObject
|
|
* @memberof cs.CSGetShopRes
|
|
* @static
|
|
* @param {Object.<string,*>} object Plain object
|
|
* @returns {cs.CSGetShopRes} CSGetShopRes
|
|
*/
|
|
CSGetShopRes.fromObject = function fromObject(object) {
|
|
if (object instanceof $root.cs.CSGetShopRes)
|
|
return object;
|
|
var message = new $root.cs.CSGetShopRes();
|
|
if (object.diamonds) {
|
|
if (!Array.isArray(object.diamonds))
|
|
throw TypeError(".cs.CSGetShopRes.diamonds: array expected");
|
|
message.diamonds = [];
|
|
for (var i = 0; i < object.diamonds.length; ++i) {
|
|
if (typeof object.diamonds[i] !== "object")
|
|
throw TypeError(".cs.CSGetShopRes.diamonds: object expected");
|
|
message.diamonds[i] = $root.cs.Diamond.fromObject(object.diamonds[i]);
|
|
}
|
|
}
|
|
if (object.vips) {
|
|
if (!Array.isArray(object.vips))
|
|
throw TypeError(".cs.CSGetShopRes.vips: array expected");
|
|
message.vips = [];
|
|
for (var i = 0; i < object.vips.length; ++i) {
|
|
if (typeof object.vips[i] !== "object")
|
|
throw TypeError(".cs.CSGetShopRes.vips: object expected");
|
|
message.vips[i] = $root.cs.Vip.fromObject(object.vips[i]);
|
|
}
|
|
}
|
|
return message;
|
|
};
|
|
|
|
/**
|
|
* Creates a plain object from a CSGetShopRes message. Also converts values to other types if specified.
|
|
* @function toObject
|
|
* @memberof cs.CSGetShopRes
|
|
* @static
|
|
* @param {cs.CSGetShopRes} message CSGetShopRes
|
|
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
* @returns {Object.<string,*>} Plain object
|
|
*/
|
|
CSGetShopRes.toObject = function toObject(message, options) {
|
|
if (!options)
|
|
options = {};
|
|
var object = {};
|
|
if (options.arrays || options.defaults) {
|
|
object.diamonds = [];
|
|
object.vips = [];
|
|
}
|
|
if (message.diamonds && message.diamonds.length) {
|
|
object.diamonds = [];
|
|
for (var j = 0; j < message.diamonds.length; ++j)
|
|
object.diamonds[j] = $root.cs.Diamond.toObject(message.diamonds[j], options);
|
|
}
|
|
if (message.vips && message.vips.length) {
|
|
object.vips = [];
|
|
for (var j = 0; j < message.vips.length; ++j)
|
|
object.vips[j] = $root.cs.Vip.toObject(message.vips[j], options);
|
|
}
|
|
return object;
|
|
};
|
|
|
|
/**
|
|
* Converts this CSGetShopRes to JSON.
|
|
* @function toJSON
|
|
* @memberof cs.CSGetShopRes
|
|
* @instance
|
|
* @returns {Object.<string,*>} JSON object
|
|
*/
|
|
CSGetShopRes.prototype.toJSON = function toJSON() {
|
|
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
};
|
|
|
|
/**
|
|
* Gets the default type url for CSGetShopRes
|
|
* @function getTypeUrl
|
|
* @memberof cs.CSGetShopRes
|
|
* @static
|
|
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
* @returns {string} The default type url
|
|
*/
|
|
CSGetShopRes.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
if (typeUrlPrefix === undefined) {
|
|
typeUrlPrefix = "type.googleapis.com";
|
|
}
|
|
return typeUrlPrefix + "/cs.CSGetShopRes";
|
|
};
|
|
|
|
return CSGetShopRes;
|
|
})();
|
|
|
|
cs.CSBuyChatReq = (function() {
|
|
|
|
/**
|
|
* Properties of a CSBuyChatReq.
|
|
* @memberof cs
|
|
* @interface ICSBuyChatReq
|
|
* @property {number|null} [girlId] CSBuyChatReq girlId
|
|
* @property {number|null} [times] CSBuyChatReq times
|
|
*/
|
|
|
|
/**
|
|
* Constructs a new CSBuyChatReq.
|
|
* @memberof cs
|
|
* @classdesc Represents a CSBuyChatReq.
|
|
* @implements ICSBuyChatReq
|
|
* @constructor
|
|
* @param {cs.ICSBuyChatReq=} [properties] Properties to set
|
|
*/
|
|
function CSBuyChatReq(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]];
|
|
}
|
|
|
|
/**
|
|
* CSBuyChatReq girlId.
|
|
* @member {number} girlId
|
|
* @memberof cs.CSBuyChatReq
|
|
* @instance
|
|
*/
|
|
CSBuyChatReq.prototype.girlId = 0;
|
|
|
|
/**
|
|
* CSBuyChatReq times.
|
|
* @member {number} times
|
|
* @memberof cs.CSBuyChatReq
|
|
* @instance
|
|
*/
|
|
CSBuyChatReq.prototype.times = 0;
|
|
|
|
/**
|
|
* Creates a new CSBuyChatReq instance using the specified properties.
|
|
* @function create
|
|
* @memberof cs.CSBuyChatReq
|
|
* @static
|
|
* @param {cs.ICSBuyChatReq=} [properties] Properties to set
|
|
* @returns {cs.CSBuyChatReq} CSBuyChatReq instance
|
|
*/
|
|
CSBuyChatReq.create = function create(properties) {
|
|
return new CSBuyChatReq(properties);
|
|
};
|
|
|
|
/**
|
|
* Encodes the specified CSBuyChatReq message. Does not implicitly {@link cs.CSBuyChatReq.verify|verify} messages.
|
|
* @function encode
|
|
* @memberof cs.CSBuyChatReq
|
|
* @static
|
|
* @param {cs.ICSBuyChatReq} message CSBuyChatReq message or plain object to encode
|
|
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
* @returns {$protobuf.Writer} Writer
|
|
*/
|
|
CSBuyChatReq.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.times != null && Object.hasOwnProperty.call(message, "times"))
|
|
writer.uint32(/* id 2, wireType 0 =*/16).int32(message.times);
|
|
return writer;
|
|
};
|
|
|
|
/**
|
|
* Encodes the specified CSBuyChatReq message, length delimited. Does not implicitly {@link cs.CSBuyChatReq.verify|verify} messages.
|
|
* @function encodeDelimited
|
|
* @memberof cs.CSBuyChatReq
|
|
* @static
|
|
* @param {cs.ICSBuyChatReq} message CSBuyChatReq message or plain object to encode
|
|
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
* @returns {$protobuf.Writer} Writer
|
|
*/
|
|
CSBuyChatReq.encodeDelimited = function encodeDelimited(message, writer) {
|
|
return this.encode(message, writer).ldelim();
|
|
};
|
|
|
|
/**
|
|
* Decodes a CSBuyChatReq message from the specified reader or buffer.
|
|
* @function decode
|
|
* @memberof cs.CSBuyChatReq
|
|
* @static
|
|
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
* @param {number} [length] Message length if known beforehand
|
|
* @returns {cs.CSBuyChatReq} CSBuyChatReq
|
|
* @throws {Error} If the payload is not a reader or valid buffer
|
|
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
*/
|
|
CSBuyChatReq.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.CSBuyChatReq();
|
|
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.times = reader.int32();
|
|
break;
|
|
}
|
|
default:
|
|
reader.skipType(tag & 7);
|
|
break;
|
|
}
|
|
}
|
|
return message;
|
|
};
|
|
|
|
/**
|
|
* Decodes a CSBuyChatReq message from the specified reader or buffer, length delimited.
|
|
* @function decodeDelimited
|
|
* @memberof cs.CSBuyChatReq
|
|
* @static
|
|
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
* @returns {cs.CSBuyChatReq} CSBuyChatReq
|
|
* @throws {Error} If the payload is not a reader or valid buffer
|
|
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
*/
|
|
CSBuyChatReq.decodeDelimited = function decodeDelimited(reader) {
|
|
if (!(reader instanceof $Reader))
|
|
reader = new $Reader(reader);
|
|
return this.decode(reader, reader.uint32());
|
|
};
|
|
|
|
/**
|
|
* Verifies a CSBuyChatReq message.
|
|
* @function verify
|
|
* @memberof cs.CSBuyChatReq
|
|
* @static
|
|
* @param {Object.<string,*>} message Plain object to verify
|
|
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
*/
|
|
CSBuyChatReq.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.times != null && message.hasOwnProperty("times"))
|
|
if (!$util.isInteger(message.times))
|
|
return "times: integer expected";
|
|
return null;
|
|
};
|
|
|
|
/**
|
|
* Creates a CSBuyChatReq message from a plain object. Also converts values to their respective internal types.
|
|
* @function fromObject
|
|
* @memberof cs.CSBuyChatReq
|
|
* @static
|
|
* @param {Object.<string,*>} object Plain object
|
|
* @returns {cs.CSBuyChatReq} CSBuyChatReq
|
|
*/
|
|
CSBuyChatReq.fromObject = function fromObject(object) {
|
|
if (object instanceof $root.cs.CSBuyChatReq)
|
|
return object;
|
|
var message = new $root.cs.CSBuyChatReq();
|
|
if (object.girlId != null)
|
|
message.girlId = object.girlId | 0;
|
|
if (object.times != null)
|
|
message.times = object.times | 0;
|
|
return message;
|
|
};
|
|
|
|
/**
|
|
* Creates a plain object from a CSBuyChatReq message. Also converts values to other types if specified.
|
|
* @function toObject
|
|
* @memberof cs.CSBuyChatReq
|
|
* @static
|
|
* @param {cs.CSBuyChatReq} message CSBuyChatReq
|
|
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
* @returns {Object.<string,*>} Plain object
|
|
*/
|
|
CSBuyChatReq.toObject = function toObject(message, options) {
|
|
if (!options)
|
|
options = {};
|
|
var object = {};
|
|
if (options.defaults) {
|
|
object.girlId = 0;
|
|
object.times = 0;
|
|
}
|
|
if (message.girlId != null && message.hasOwnProperty("girlId"))
|
|
object.girlId = message.girlId;
|
|
if (message.times != null && message.hasOwnProperty("times"))
|
|
object.times = message.times;
|
|
return object;
|
|
};
|
|
|
|
/**
|
|
* Converts this CSBuyChatReq to JSON.
|
|
* @function toJSON
|
|
* @memberof cs.CSBuyChatReq
|
|
* @instance
|
|
* @returns {Object.<string,*>} JSON object
|
|
*/
|
|
CSBuyChatReq.prototype.toJSON = function toJSON() {
|
|
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
};
|
|
|
|
/**
|
|
* Gets the default type url for CSBuyChatReq
|
|
* @function getTypeUrl
|
|
* @memberof cs.CSBuyChatReq
|
|
* @static
|
|
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
* @returns {string} The default type url
|
|
*/
|
|
CSBuyChatReq.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
if (typeUrlPrefix === undefined) {
|
|
typeUrlPrefix = "type.googleapis.com";
|
|
}
|
|
return typeUrlPrefix + "/cs.CSBuyChatReq";
|
|
};
|
|
|
|
return CSBuyChatReq;
|
|
})();
|
|
|
|
cs.CSBuyChatRes = (function() {
|
|
|
|
/**
|
|
* Properties of a CSBuyChatRes.
|
|
* @memberof cs
|
|
* @interface ICSBuyChatRes
|
|
*/
|
|
|
|
/**
|
|
* Constructs a new CSBuyChatRes.
|
|
* @memberof cs
|
|
* @classdesc Represents a CSBuyChatRes.
|
|
* @implements ICSBuyChatRes
|
|
* @constructor
|
|
* @param {cs.ICSBuyChatRes=} [properties] Properties to set
|
|
*/
|
|
function CSBuyChatRes(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 CSBuyChatRes instance using the specified properties.
|
|
* @function create
|
|
* @memberof cs.CSBuyChatRes
|
|
* @static
|
|
* @param {cs.ICSBuyChatRes=} [properties] Properties to set
|
|
* @returns {cs.CSBuyChatRes} CSBuyChatRes instance
|
|
*/
|
|
CSBuyChatRes.create = function create(properties) {
|
|
return new CSBuyChatRes(properties);
|
|
};
|
|
|
|
/**
|
|
* Encodes the specified CSBuyChatRes message. Does not implicitly {@link cs.CSBuyChatRes.verify|verify} messages.
|
|
* @function encode
|
|
* @memberof cs.CSBuyChatRes
|
|
* @static
|
|
* @param {cs.ICSBuyChatRes} message CSBuyChatRes message or plain object to encode
|
|
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
* @returns {$protobuf.Writer} Writer
|
|
*/
|
|
CSBuyChatRes.encode = function encode(message, writer) {
|
|
if (!writer)
|
|
writer = $Writer.create();
|
|
return writer;
|
|
};
|
|
|
|
/**
|
|
* Encodes the specified CSBuyChatRes message, length delimited. Does not implicitly {@link cs.CSBuyChatRes.verify|verify} messages.
|
|
* @function encodeDelimited
|
|
* @memberof cs.CSBuyChatRes
|
|
* @static
|
|
* @param {cs.ICSBuyChatRes} message CSBuyChatRes message or plain object to encode
|
|
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
* @returns {$protobuf.Writer} Writer
|
|
*/
|
|
CSBuyChatRes.encodeDelimited = function encodeDelimited(message, writer) {
|
|
return this.encode(message, writer).ldelim();
|
|
};
|
|
|
|
/**
|
|
* Decodes a CSBuyChatRes message from the specified reader or buffer.
|
|
* @function decode
|
|
* @memberof cs.CSBuyChatRes
|
|
* @static
|
|
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
* @param {number} [length] Message length if known beforehand
|
|
* @returns {cs.CSBuyChatRes} CSBuyChatRes
|
|
* @throws {Error} If the payload is not a reader or valid buffer
|
|
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
*/
|
|
CSBuyChatRes.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.CSBuyChatRes();
|
|
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 CSBuyChatRes message from the specified reader or buffer, length delimited.
|
|
* @function decodeDelimited
|
|
* @memberof cs.CSBuyChatRes
|
|
* @static
|
|
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
* @returns {cs.CSBuyChatRes} CSBuyChatRes
|
|
* @throws {Error} If the payload is not a reader or valid buffer
|
|
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
*/
|
|
CSBuyChatRes.decodeDelimited = function decodeDelimited(reader) {
|
|
if (!(reader instanceof $Reader))
|
|
reader = new $Reader(reader);
|
|
return this.decode(reader, reader.uint32());
|
|
};
|
|
|
|
/**
|
|
* Verifies a CSBuyChatRes message.
|
|
* @function verify
|
|
* @memberof cs.CSBuyChatRes
|
|
* @static
|
|
* @param {Object.<string,*>} message Plain object to verify
|
|
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
*/
|
|
CSBuyChatRes.verify = function verify(message) {
|
|
if (typeof message !== "object" || message === null)
|
|
return "object expected";
|
|
return null;
|
|
};
|
|
|
|
/**
|
|
* Creates a CSBuyChatRes message from a plain object. Also converts values to their respective internal types.
|
|
* @function fromObject
|
|
* @memberof cs.CSBuyChatRes
|
|
* @static
|
|
* @param {Object.<string,*>} object Plain object
|
|
* @returns {cs.CSBuyChatRes} CSBuyChatRes
|
|
*/
|
|
CSBuyChatRes.fromObject = function fromObject(object) {
|
|
if (object instanceof $root.cs.CSBuyChatRes)
|
|
return object;
|
|
return new $root.cs.CSBuyChatRes();
|
|
};
|
|
|
|
/**
|
|
* Creates a plain object from a CSBuyChatRes message. Also converts values to other types if specified.
|
|
* @function toObject
|
|
* @memberof cs.CSBuyChatRes
|
|
* @static
|
|
* @param {cs.CSBuyChatRes} message CSBuyChatRes
|
|
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
* @returns {Object.<string,*>} Plain object
|
|
*/
|
|
CSBuyChatRes.toObject = function toObject() {
|
|
return {};
|
|
};
|
|
|
|
/**
|
|
* Converts this CSBuyChatRes to JSON.
|
|
* @function toJSON
|
|
* @memberof cs.CSBuyChatRes
|
|
* @instance
|
|
* @returns {Object.<string,*>} JSON object
|
|
*/
|
|
CSBuyChatRes.prototype.toJSON = function toJSON() {
|
|
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
};
|
|
|
|
/**
|
|
* Gets the default type url for CSBuyChatRes
|
|
* @function getTypeUrl
|
|
* @memberof cs.CSBuyChatRes
|
|
* @static
|
|
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
* @returns {string} The default type url
|
|
*/
|
|
CSBuyChatRes.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
if (typeUrlPrefix === undefined) {
|
|
typeUrlPrefix = "type.googleapis.com";
|
|
}
|
|
return typeUrlPrefix + "/cs.CSBuyChatRes";
|
|
};
|
|
|
|
return CSBuyChatRes;
|
|
})();
|
|
|
|
cs.CSCreateOrderReq = (function() {
|
|
|
|
/**
|
|
* Properties of a CSCreateOrderReq.
|
|
* @memberof cs
|
|
* @interface ICSCreateOrderReq
|
|
* @property {number|null} [id] CSCreateOrderReq id
|
|
*/
|
|
|
|
/**
|
|
* 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 id.
|
|
* @member {number} id
|
|
* @memberof cs.CSCreateOrderReq
|
|
* @instance
|
|
*/
|
|
CSCreateOrderReq.prototype.id = 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.id != null && Object.hasOwnProperty.call(message, "id"))
|
|
writer.uint32(/* id 1, wireType 0 =*/8).int32(message.id);
|
|
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.id = 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.<string,*>} 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.id != null && message.hasOwnProperty("id"))
|
|
if (!$util.isInteger(message.id))
|
|
return "id: 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.<string,*>} 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.id != null)
|
|
message.id = object.id | 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.<string,*>} Plain object
|
|
*/
|
|
CSCreateOrderReq.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 CSCreateOrderReq to JSON.
|
|
* @function toJSON
|
|
* @memberof cs.CSCreateOrderReq
|
|
* @instance
|
|
* @returns {Object.<string,*>} 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
|
|
*/
|
|
|
|
/**
|
|
* 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 = "";
|
|
|
|
/**
|
|
* 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);
|
|
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;
|
|
}
|
|
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.<string,*>} 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";
|
|
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.<string,*>} 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);
|
|
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.<string,*>} Plain object
|
|
*/
|
|
CSCreateOrderRes.toObject = function toObject(message, options) {
|
|
if (!options)
|
|
options = {};
|
|
var object = {};
|
|
if (options.defaults)
|
|
object.payUrl = "";
|
|
if (message.payUrl != null && message.hasOwnProperty("payUrl"))
|
|
object.payUrl = message.payUrl;
|
|
return object;
|
|
};
|
|
|
|
/**
|
|
* Converts this CSCreateOrderRes to JSON.
|
|
* @function toJSON
|
|
* @memberof cs.CSCreateOrderRes
|
|
* @instance
|
|
* @returns {Object.<string,*>} 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.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.<string,*>} 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.<string,*>} 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.<string,*>} 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.<string,*>} 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
|
|
*/
|
|
|
|
/**
|
|
* 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;
|
|
|
|
/**
|
|
* 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);
|
|
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;
|
|
}
|
|
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.<string,*>} 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";
|
|
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.<string,*>} 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();
|
|
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.<string,*>} 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;
|
|
}
|
|
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;
|
|
return object;
|
|
};
|
|
|
|
/**
|
|
* Converts this CSLoginRes to JSON.
|
|
* @function toJSON
|
|
* @memberof cs.CSLoginRes
|
|
* @instance
|
|
* @returns {Object.<string,*>} 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.<string,*>} 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.<string,*>} 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.<string,*>} Plain object
|
|
*/
|
|
CSMyInfoReq.toObject = function toObject() {
|
|
return {};
|
|
};
|
|
|
|
/**
|
|
* Converts this CSMyInfoReq to JSON.
|
|
* @function toJSON
|
|
* @memberof cs.CSMyInfoReq
|
|
* @instance
|
|
* @returns {Object.<string,*>} 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} [diamond] CSMyInfoRes diamond
|
|
* @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 diamond.
|
|
* @member {number|Long} diamond
|
|
* @memberof cs.CSMyInfoRes
|
|
* @instance
|
|
*/
|
|
CSMyInfoRes.prototype.diamond = $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.diamond != null && Object.hasOwnProperty.call(message, "diamond"))
|
|
writer.uint32(/* id 1, wireType 0 =*/8).int64(message.diamond);
|
|
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.diamond = 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.<string,*>} 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.diamond != null && message.hasOwnProperty("diamond"))
|
|
if (!$util.isInteger(message.diamond) && !(message.diamond && $util.isInteger(message.diamond.low) && $util.isInteger(message.diamond.high)))
|
|
return "diamond: 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.<string,*>} 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.diamond != null)
|
|
if ($util.Long)
|
|
(message.diamond = $util.Long.fromValue(object.diamond)).unsigned = false;
|
|
else if (typeof object.diamond === "string")
|
|
message.diamond = parseInt(object.diamond, 10);
|
|
else if (typeof object.diamond === "number")
|
|
message.diamond = object.diamond;
|
|
else if (typeof object.diamond === "object")
|
|
message.diamond = new $util.LongBits(object.diamond.low >>> 0, object.diamond.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.<string,*>} 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.diamond = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
|
|
} else
|
|
object.diamond = 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.diamond != null && message.hasOwnProperty("diamond"))
|
|
if (typeof message.diamond === "number")
|
|
object.diamond = options.longs === String ? String(message.diamond) : message.diamond;
|
|
else
|
|
object.diamond = options.longs === String ? $util.Long.prototype.toString.call(message.diamond) : options.longs === Number ? new $util.LongBits(message.diamond.low >>> 0, message.diamond.high >>> 0).toNumber() : message.diamond;
|
|
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.<string,*>} 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=5010 GenJWTFailed value
|
|
* @property {number} InvalidArg=5013 InvalidArg value
|
|
* @property {number} MySQL=5027 MySQL value
|
|
* @property {number} TokenExpire=5046 TokenExpire value
|
|
* @property {number} TokenInvalid=5047 TokenInvalid value
|
|
*/
|
|
cs.EnmRetCode = (function() {
|
|
var valuesById = {}, values = Object.create(valuesById);
|
|
values[valuesById[0] = "SUCCESS"] = 0;
|
|
values[valuesById[5010] = "GenJWTFailed"] = 5010;
|
|
values[valuesById[5013] = "InvalidArg"] = 5013;
|
|
values[valuesById[5027] = "MySQL"] = 5027;
|
|
values[valuesById[5046] = "TokenExpire"] = 5046;
|
|
values[valuesById[5047] = "TokenInvalid"] = 5047;
|
|
return values;
|
|
})();
|
|
|
|
return cs;
|
|
})();
|
|
|
|
module.exports = $root;
|
|
|
|
module.exports.default = module.exports; |