获取可聊天的技师数据

This commit is contained in:
chen wei bo
2025-09-22 17:54:45 +08:00
parent 26019a0080
commit d56c2518f5
10 changed files with 1507 additions and 53 deletions
+900
View File
@@ -1047,6 +1047,7 @@ $root.cs = (function() {
* @property {cs.IGirls|null} [girl] GirlData girl
* @property {boolean|null} [isRelease] GirlData isRelease
* @property {number|null} [star] GirlData star
* @property {number|Long|null} [unlockTime] GirlData unlockTime
* @property {cs.IGirlsDetail|null} [detail] GirlData detail
* @property {Array.<cs.IResourceUnlock>|null} [images] GirlData images
* @property {Array.<cs.IResourceUnlock>|null} [videos] GirlData videos
@@ -1103,6 +1104,14 @@ $root.cs = (function() {
*/
GirlData.prototype.star = 0;
/**
* GirlData unlockTime.
* @member {number|Long} unlockTime
* @memberof cs.GirlData
* @instance
*/
GirlData.prototype.unlockTime = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
/**
* GirlData detail.
* @member {cs.IGirlsDetail|null|undefined} detail
@@ -1175,6 +1184,8 @@ $root.cs = (function() {
writer.uint32(/* id 3, wireType 0 =*/24).bool(message.isRelease);
if (message.star != null && Object.hasOwnProperty.call(message, "star"))
writer.uint32(/* id 4, wireType 0 =*/32).int32(message.star);
if (message.unlockTime != null && Object.hasOwnProperty.call(message, "unlockTime"))
writer.uint32(/* id 5, wireType 0 =*/40).int64(message.unlockTime);
if (message.detail != null && Object.hasOwnProperty.call(message, "detail"))
$root.cs.GirlsDetail.encode(message.detail, writer.uint32(/* id 30, wireType 2 =*/242).fork()).ldelim();
if (message.images != null && message.images.length)
@@ -1239,6 +1250,10 @@ $root.cs = (function() {
message.star = reader.int32();
break;
}
case 5: {
message.unlockTime = reader.int64();
break;
}
case 30: {
message.detail = $root.cs.GirlsDetail.decode(reader, reader.uint32());
break;
@@ -1312,6 +1327,9 @@ $root.cs = (function() {
if (message.star != null && message.hasOwnProperty("star"))
if (!$util.isInteger(message.star))
return "star: integer expected";
if (message.unlockTime != null && message.hasOwnProperty("unlockTime"))
if (!$util.isInteger(message.unlockTime) && !(message.unlockTime && $util.isInteger(message.unlockTime.low) && $util.isInteger(message.unlockTime.high)))
return "unlockTime: integer|Long expected";
if (message.detail != null && message.hasOwnProperty("detail")) {
var error = $root.cs.GirlsDetail.verify(message.detail);
if (error)
@@ -1367,6 +1385,15 @@ $root.cs = (function() {
message.isRelease = Boolean(object.isRelease);
if (object.star != null)
message.star = object.star | 0;
if (object.unlockTime != null)
if ($util.Long)
(message.unlockTime = $util.Long.fromValue(object.unlockTime)).unsigned = false;
else if (typeof object.unlockTime === "string")
message.unlockTime = parseInt(object.unlockTime, 10);
else if (typeof object.unlockTime === "number")
message.unlockTime = object.unlockTime;
else if (typeof object.unlockTime === "object")
message.unlockTime = new $util.LongBits(object.unlockTime.low >>> 0, object.unlockTime.high >>> 0).toNumber();
if (object.detail != null) {
if (typeof object.detail !== "object")
throw TypeError(".cs.GirlData.detail: object expected");
@@ -1421,6 +1448,11 @@ $root.cs = (function() {
object.girl = null;
object.isRelease = false;
object.star = 0;
if ($util.Long) {
var long = new $util.Long(0, 0, false);
object.unlockTime = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
} else
object.unlockTime = options.longs === String ? "0" : 0;
object.detail = null;
object.chatTotalCount = 0;
object.chatRemainCount = 0;
@@ -1433,6 +1465,11 @@ $root.cs = (function() {
object.isRelease = message.isRelease;
if (message.star != null && message.hasOwnProperty("star"))
object.star = message.star;
if (message.unlockTime != null && message.hasOwnProperty("unlockTime"))
if (typeof message.unlockTime === "number")
object.unlockTime = options.longs === String ? String(message.unlockTime) : message.unlockTime;
else
object.unlockTime = options.longs === String ? $util.Long.prototype.toString.call(message.unlockTime) : options.longs === Number ? new $util.LongBits(message.unlockTime.low >>> 0, message.unlockTime.high >>> 0).toNumber() : message.unlockTime;
if (message.detail != null && message.hasOwnProperty("detail"))
object.detail = $root.cs.GirlsDetail.toObject(message.detail, options);
if (message.images && message.images.length) {
@@ -7545,6 +7582,869 @@ $root.cs = (function() {
return CSGetPurchaseRes;
})();
cs.LastChatData = (function() {
/**
* Properties of a LastChatData.
* @memberof cs
* @interface ILastChatData
* @property {number|null} [id] LastChatData id
* @property {cs.IGirls|null} [girl] LastChatData girl
* @property {boolean|null} [isRelease] LastChatData isRelease
* @property {number|null} [star] LastChatData star
* @property {number|null} [chatRemainCount] LastChatData chatRemainCount
* @property {number|null} [chatTotalCount] LastChatData chatTotalCount
* @property {number|Long|null} [unlockTime] LastChatData unlockTime
* @property {Array.<cs.IChatMsg>|null} [msgs] LastChatData msgs
*/
/**
* Constructs a new LastChatData.
* @memberof cs
* @classdesc Represents a LastChatData.
* @implements ILastChatData
* @constructor
* @param {cs.ILastChatData=} [properties] Properties to set
*/
function LastChatData(properties) {
this.msgs = [];
if (properties)
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
if (properties[keys[i]] != null)
this[keys[i]] = properties[keys[i]];
}
/**
* LastChatData id.
* @member {number} id
* @memberof cs.LastChatData
* @instance
*/
LastChatData.prototype.id = 0;
/**
* LastChatData girl.
* @member {cs.IGirls|null|undefined} girl
* @memberof cs.LastChatData
* @instance
*/
LastChatData.prototype.girl = null;
/**
* LastChatData isRelease.
* @member {boolean} isRelease
* @memberof cs.LastChatData
* @instance
*/
LastChatData.prototype.isRelease = false;
/**
* LastChatData star.
* @member {number} star
* @memberof cs.LastChatData
* @instance
*/
LastChatData.prototype.star = 0;
/**
* LastChatData chatRemainCount.
* @member {number} chatRemainCount
* @memberof cs.LastChatData
* @instance
*/
LastChatData.prototype.chatRemainCount = 0;
/**
* LastChatData chatTotalCount.
* @member {number} chatTotalCount
* @memberof cs.LastChatData
* @instance
*/
LastChatData.prototype.chatTotalCount = 0;
/**
* LastChatData unlockTime.
* @member {number|Long} unlockTime
* @memberof cs.LastChatData
* @instance
*/
LastChatData.prototype.unlockTime = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
/**
* LastChatData msgs.
* @member {Array.<cs.IChatMsg>} msgs
* @memberof cs.LastChatData
* @instance
*/
LastChatData.prototype.msgs = $util.emptyArray;
/**
* Creates a new LastChatData instance using the specified properties.
* @function create
* @memberof cs.LastChatData
* @static
* @param {cs.ILastChatData=} [properties] Properties to set
* @returns {cs.LastChatData} LastChatData instance
*/
LastChatData.create = function create(properties) {
return new LastChatData(properties);
};
/**
* Encodes the specified LastChatData message. Does not implicitly {@link cs.LastChatData.verify|verify} messages.
* @function encode
* @memberof cs.LastChatData
* @static
* @param {cs.ILastChatData} message LastChatData message or plain object to encode
* @param {$protobuf.Writer} [writer] Writer to encode to
* @returns {$protobuf.Writer} Writer
*/
LastChatData.encode = function encode(message, writer) {
if (!writer)
writer = $Writer.create();
if (message.id != null && Object.hasOwnProperty.call(message, "id"))
writer.uint32(/* id 1, wireType 0 =*/8).int32(message.id);
if (message.girl != null && Object.hasOwnProperty.call(message, "girl"))
$root.cs.Girls.encode(message.girl, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
if (message.isRelease != null && Object.hasOwnProperty.call(message, "isRelease"))
writer.uint32(/* id 3, wireType 0 =*/24).bool(message.isRelease);
if (message.star != null && Object.hasOwnProperty.call(message, "star"))
writer.uint32(/* id 4, wireType 0 =*/32).int32(message.star);
if (message.chatRemainCount != null && Object.hasOwnProperty.call(message, "chatRemainCount"))
writer.uint32(/* id 5, wireType 0 =*/40).int32(message.chatRemainCount);
if (message.chatTotalCount != null && Object.hasOwnProperty.call(message, "chatTotalCount"))
writer.uint32(/* id 6, wireType 0 =*/48).int32(message.chatTotalCount);
if (message.unlockTime != null && Object.hasOwnProperty.call(message, "unlockTime"))
writer.uint32(/* id 7, wireType 0 =*/56).int64(message.unlockTime);
if (message.msgs != null && message.msgs.length)
for (var i = 0; i < message.msgs.length; ++i)
$root.cs.ChatMsg.encode(message.msgs[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim();
return writer;
};
/**
* Encodes the specified LastChatData message, length delimited. Does not implicitly {@link cs.LastChatData.verify|verify} messages.
* @function encodeDelimited
* @memberof cs.LastChatData
* @static
* @param {cs.ILastChatData} message LastChatData message or plain object to encode
* @param {$protobuf.Writer} [writer] Writer to encode to
* @returns {$protobuf.Writer} Writer
*/
LastChatData.encodeDelimited = function encodeDelimited(message, writer) {
return this.encode(message, writer).ldelim();
};
/**
* Decodes a LastChatData message from the specified reader or buffer.
* @function decode
* @memberof cs.LastChatData
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @param {number} [length] Message length if known beforehand
* @returns {cs.LastChatData} LastChatData
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
LastChatData.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.LastChatData();
while (reader.pos < end) {
var tag = reader.uint32();
if (tag === error)
break;
switch (tag >>> 3) {
case 1: {
message.id = reader.int32();
break;
}
case 2: {
message.girl = $root.cs.Girls.decode(reader, reader.uint32());
break;
}
case 3: {
message.isRelease = reader.bool();
break;
}
case 4: {
message.star = reader.int32();
break;
}
case 5: {
message.chatRemainCount = reader.int32();
break;
}
case 6: {
message.chatTotalCount = reader.int32();
break;
}
case 7: {
message.unlockTime = reader.int64();
break;
}
case 8: {
if (!(message.msgs && message.msgs.length))
message.msgs = [];
message.msgs.push($root.cs.ChatMsg.decode(reader, reader.uint32()));
break;
}
default:
reader.skipType(tag & 7);
break;
}
}
return message;
};
/**
* Decodes a LastChatData message from the specified reader or buffer, length delimited.
* @function decodeDelimited
* @memberof cs.LastChatData
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @returns {cs.LastChatData} LastChatData
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
LastChatData.decodeDelimited = function decodeDelimited(reader) {
if (!(reader instanceof $Reader))
reader = new $Reader(reader);
return this.decode(reader, reader.uint32());
};
/**
* Verifies a LastChatData message.
* @function verify
* @memberof cs.LastChatData
* @static
* @param {Object.<string,*>} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
LastChatData.verify = function verify(message) {
if (typeof message !== "object" || message === null)
return "object expected";
if (message.id != null && message.hasOwnProperty("id"))
if (!$util.isInteger(message.id))
return "id: integer expected";
if (message.girl != null && message.hasOwnProperty("girl")) {
var error = $root.cs.Girls.verify(message.girl);
if (error)
return "girl." + error;
}
if (message.isRelease != null && message.hasOwnProperty("isRelease"))
if (typeof message.isRelease !== "boolean")
return "isRelease: boolean expected";
if (message.star != null && message.hasOwnProperty("star"))
if (!$util.isInteger(message.star))
return "star: integer expected";
if (message.chatRemainCount != null && message.hasOwnProperty("chatRemainCount"))
if (!$util.isInteger(message.chatRemainCount))
return "chatRemainCount: integer expected";
if (message.chatTotalCount != null && message.hasOwnProperty("chatTotalCount"))
if (!$util.isInteger(message.chatTotalCount))
return "chatTotalCount: integer expected";
if (message.unlockTime != null && message.hasOwnProperty("unlockTime"))
if (!$util.isInteger(message.unlockTime) && !(message.unlockTime && $util.isInteger(message.unlockTime.low) && $util.isInteger(message.unlockTime.high)))
return "unlockTime: integer|Long expected";
if (message.msgs != null && message.hasOwnProperty("msgs")) {
if (!Array.isArray(message.msgs))
return "msgs: array expected";
for (var i = 0; i < message.msgs.length; ++i) {
var error = $root.cs.ChatMsg.verify(message.msgs[i]);
if (error)
return "msgs." + error;
}
}
return null;
};
/**
* Creates a LastChatData message from a plain object. Also converts values to their respective internal types.
* @function fromObject
* @memberof cs.LastChatData
* @static
* @param {Object.<string,*>} object Plain object
* @returns {cs.LastChatData} LastChatData
*/
LastChatData.fromObject = function fromObject(object) {
if (object instanceof $root.cs.LastChatData)
return object;
var message = new $root.cs.LastChatData();
if (object.id != null)
message.id = object.id | 0;
if (object.girl != null) {
if (typeof object.girl !== "object")
throw TypeError(".cs.LastChatData.girl: object expected");
message.girl = $root.cs.Girls.fromObject(object.girl);
}
if (object.isRelease != null)
message.isRelease = Boolean(object.isRelease);
if (object.star != null)
message.star = object.star | 0;
if (object.chatRemainCount != null)
message.chatRemainCount = object.chatRemainCount | 0;
if (object.chatTotalCount != null)
message.chatTotalCount = object.chatTotalCount | 0;
if (object.unlockTime != null)
if ($util.Long)
(message.unlockTime = $util.Long.fromValue(object.unlockTime)).unsigned = false;
else if (typeof object.unlockTime === "string")
message.unlockTime = parseInt(object.unlockTime, 10);
else if (typeof object.unlockTime === "number")
message.unlockTime = object.unlockTime;
else if (typeof object.unlockTime === "object")
message.unlockTime = new $util.LongBits(object.unlockTime.low >>> 0, object.unlockTime.high >>> 0).toNumber();
if (object.msgs) {
if (!Array.isArray(object.msgs))
throw TypeError(".cs.LastChatData.msgs: array expected");
message.msgs = [];
for (var i = 0; i < object.msgs.length; ++i) {
if (typeof object.msgs[i] !== "object")
throw TypeError(".cs.LastChatData.msgs: object expected");
message.msgs[i] = $root.cs.ChatMsg.fromObject(object.msgs[i]);
}
}
return message;
};
/**
* Creates a plain object from a LastChatData message. Also converts values to other types if specified.
* @function toObject
* @memberof cs.LastChatData
* @static
* @param {cs.LastChatData} message LastChatData
* @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.<string,*>} Plain object
*/
LastChatData.toObject = function toObject(message, options) {
if (!options)
options = {};
var object = {};
if (options.arrays || options.defaults)
object.msgs = [];
if (options.defaults) {
object.id = 0;
object.girl = null;
object.isRelease = false;
object.star = 0;
object.chatRemainCount = 0;
object.chatTotalCount = 0;
if ($util.Long) {
var long = new $util.Long(0, 0, false);
object.unlockTime = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
} else
object.unlockTime = options.longs === String ? "0" : 0;
}
if (message.id != null && message.hasOwnProperty("id"))
object.id = message.id;
if (message.girl != null && message.hasOwnProperty("girl"))
object.girl = $root.cs.Girls.toObject(message.girl, options);
if (message.isRelease != null && message.hasOwnProperty("isRelease"))
object.isRelease = message.isRelease;
if (message.star != null && message.hasOwnProperty("star"))
object.star = message.star;
if (message.chatRemainCount != null && message.hasOwnProperty("chatRemainCount"))
object.chatRemainCount = message.chatRemainCount;
if (message.chatTotalCount != null && message.hasOwnProperty("chatTotalCount"))
object.chatTotalCount = message.chatTotalCount;
if (message.unlockTime != null && message.hasOwnProperty("unlockTime"))
if (typeof message.unlockTime === "number")
object.unlockTime = options.longs === String ? String(message.unlockTime) : message.unlockTime;
else
object.unlockTime = options.longs === String ? $util.Long.prototype.toString.call(message.unlockTime) : options.longs === Number ? new $util.LongBits(message.unlockTime.low >>> 0, message.unlockTime.high >>> 0).toNumber() : message.unlockTime;
if (message.msgs && message.msgs.length) {
object.msgs = [];
for (var j = 0; j < message.msgs.length; ++j)
object.msgs[j] = $root.cs.ChatMsg.toObject(message.msgs[j], options);
}
return object;
};
/**
* Converts this LastChatData to JSON.
* @function toJSON
* @memberof cs.LastChatData
* @instance
* @returns {Object.<string,*>} JSON object
*/
LastChatData.prototype.toJSON = function toJSON() {
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
};
/**
* Gets the default type url for LastChatData
* @function getTypeUrl
* @memberof cs.LastChatData
* @static
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns {string} The default type url
*/
LastChatData.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
if (typeUrlPrefix === undefined) {
typeUrlPrefix = "type.googleapis.com";
}
return typeUrlPrefix + "/cs.LastChatData";
};
return LastChatData;
})();
cs.CSGetLastChatListReq = (function() {
/**
* Properties of a CSGetLastChatListReq.
* @memberof cs
* @interface ICSGetLastChatListReq
* @property {number|null} [page] CSGetLastChatListReq page
* @property {number|null} [limit] CSGetLastChatListReq limit
*/
/**
* Constructs a new CSGetLastChatListReq.
* @memberof cs
* @classdesc Represents a CSGetLastChatListReq.
* @implements ICSGetLastChatListReq
* @constructor
* @param {cs.ICSGetLastChatListReq=} [properties] Properties to set
*/
function CSGetLastChatListReq(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]];
}
/**
* CSGetLastChatListReq page.
* @member {number} page
* @memberof cs.CSGetLastChatListReq
* @instance
*/
CSGetLastChatListReq.prototype.page = 0;
/**
* CSGetLastChatListReq limit.
* @member {number} limit
* @memberof cs.CSGetLastChatListReq
* @instance
*/
CSGetLastChatListReq.prototype.limit = 0;
/**
* Creates a new CSGetLastChatListReq instance using the specified properties.
* @function create
* @memberof cs.CSGetLastChatListReq
* @static
* @param {cs.ICSGetLastChatListReq=} [properties] Properties to set
* @returns {cs.CSGetLastChatListReq} CSGetLastChatListReq instance
*/
CSGetLastChatListReq.create = function create(properties) {
return new CSGetLastChatListReq(properties);
};
/**
* Encodes the specified CSGetLastChatListReq message. Does not implicitly {@link cs.CSGetLastChatListReq.verify|verify} messages.
* @function encode
* @memberof cs.CSGetLastChatListReq
* @static
* @param {cs.ICSGetLastChatListReq} message CSGetLastChatListReq message or plain object to encode
* @param {$protobuf.Writer} [writer] Writer to encode to
* @returns {$protobuf.Writer} Writer
*/
CSGetLastChatListReq.encode = function encode(message, writer) {
if (!writer)
writer = $Writer.create();
if (message.page != null && Object.hasOwnProperty.call(message, "page"))
writer.uint32(/* id 1, wireType 0 =*/8).int32(message.page);
if (message.limit != null && Object.hasOwnProperty.call(message, "limit"))
writer.uint32(/* id 2, wireType 0 =*/16).int32(message.limit);
return writer;
};
/**
* Encodes the specified CSGetLastChatListReq message, length delimited. Does not implicitly {@link cs.CSGetLastChatListReq.verify|verify} messages.
* @function encodeDelimited
* @memberof cs.CSGetLastChatListReq
* @static
* @param {cs.ICSGetLastChatListReq} message CSGetLastChatListReq message or plain object to encode
* @param {$protobuf.Writer} [writer] Writer to encode to
* @returns {$protobuf.Writer} Writer
*/
CSGetLastChatListReq.encodeDelimited = function encodeDelimited(message, writer) {
return this.encode(message, writer).ldelim();
};
/**
* Decodes a CSGetLastChatListReq message from the specified reader or buffer.
* @function decode
* @memberof cs.CSGetLastChatListReq
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @param {number} [length] Message length if known beforehand
* @returns {cs.CSGetLastChatListReq} CSGetLastChatListReq
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
CSGetLastChatListReq.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.CSGetLastChatListReq();
while (reader.pos < end) {
var tag = reader.uint32();
if (tag === error)
break;
switch (tag >>> 3) {
case 1: {
message.page = reader.int32();
break;
}
case 2: {
message.limit = reader.int32();
break;
}
default:
reader.skipType(tag & 7);
break;
}
}
return message;
};
/**
* Decodes a CSGetLastChatListReq message from the specified reader or buffer, length delimited.
* @function decodeDelimited
* @memberof cs.CSGetLastChatListReq
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @returns {cs.CSGetLastChatListReq} CSGetLastChatListReq
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
CSGetLastChatListReq.decodeDelimited = function decodeDelimited(reader) {
if (!(reader instanceof $Reader))
reader = new $Reader(reader);
return this.decode(reader, reader.uint32());
};
/**
* Verifies a CSGetLastChatListReq message.
* @function verify
* @memberof cs.CSGetLastChatListReq
* @static
* @param {Object.<string,*>} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
CSGetLastChatListReq.verify = function verify(message) {
if (typeof message !== "object" || message === null)
return "object expected";
if (message.page != null && message.hasOwnProperty("page"))
if (!$util.isInteger(message.page))
return "page: integer expected";
if (message.limit != null && message.hasOwnProperty("limit"))
if (!$util.isInteger(message.limit))
return "limit: integer expected";
return null;
};
/**
* Creates a CSGetLastChatListReq message from a plain object. Also converts values to their respective internal types.
* @function fromObject
* @memberof cs.CSGetLastChatListReq
* @static
* @param {Object.<string,*>} object Plain object
* @returns {cs.CSGetLastChatListReq} CSGetLastChatListReq
*/
CSGetLastChatListReq.fromObject = function fromObject(object) {
if (object instanceof $root.cs.CSGetLastChatListReq)
return object;
var message = new $root.cs.CSGetLastChatListReq();
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 CSGetLastChatListReq message. Also converts values to other types if specified.
* @function toObject
* @memberof cs.CSGetLastChatListReq
* @static
* @param {cs.CSGetLastChatListReq} message CSGetLastChatListReq
* @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.<string,*>} Plain object
*/
CSGetLastChatListReq.toObject = function toObject(message, options) {
if (!options)
options = {};
var object = {};
if (options.defaults) {
object.page = 0;
object.limit = 0;
}
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 CSGetLastChatListReq to JSON.
* @function toJSON
* @memberof cs.CSGetLastChatListReq
* @instance
* @returns {Object.<string,*>} JSON object
*/
CSGetLastChatListReq.prototype.toJSON = function toJSON() {
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
};
/**
* Gets the default type url for CSGetLastChatListReq
* @function getTypeUrl
* @memberof cs.CSGetLastChatListReq
* @static
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns {string} The default type url
*/
CSGetLastChatListReq.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
if (typeUrlPrefix === undefined) {
typeUrlPrefix = "type.googleapis.com";
}
return typeUrlPrefix + "/cs.CSGetLastChatListReq";
};
return CSGetLastChatListReq;
})();
cs.CSGetLastChatListRes = (function() {
/**
* Properties of a CSGetLastChatListRes.
* @memberof cs
* @interface ICSGetLastChatListRes
* @property {Array.<cs.ILastChatData>|null} [LastChatList] CSGetLastChatListRes LastChatList
*/
/**
* Constructs a new CSGetLastChatListRes.
* @memberof cs
* @classdesc Represents a CSGetLastChatListRes.
* @implements ICSGetLastChatListRes
* @constructor
* @param {cs.ICSGetLastChatListRes=} [properties] Properties to set
*/
function CSGetLastChatListRes(properties) {
this.LastChatList = [];
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]];
}
/**
* CSGetLastChatListRes LastChatList.
* @member {Array.<cs.ILastChatData>} LastChatList
* @memberof cs.CSGetLastChatListRes
* @instance
*/
CSGetLastChatListRes.prototype.LastChatList = $util.emptyArray;
/**
* Creates a new CSGetLastChatListRes instance using the specified properties.
* @function create
* @memberof cs.CSGetLastChatListRes
* @static
* @param {cs.ICSGetLastChatListRes=} [properties] Properties to set
* @returns {cs.CSGetLastChatListRes} CSGetLastChatListRes instance
*/
CSGetLastChatListRes.create = function create(properties) {
return new CSGetLastChatListRes(properties);
};
/**
* Encodes the specified CSGetLastChatListRes message. Does not implicitly {@link cs.CSGetLastChatListRes.verify|verify} messages.
* @function encode
* @memberof cs.CSGetLastChatListRes
* @static
* @param {cs.ICSGetLastChatListRes} message CSGetLastChatListRes message or plain object to encode
* @param {$protobuf.Writer} [writer] Writer to encode to
* @returns {$protobuf.Writer} Writer
*/
CSGetLastChatListRes.encode = function encode(message, writer) {
if (!writer)
writer = $Writer.create();
if (message.LastChatList != null && message.LastChatList.length)
for (var i = 0; i < message.LastChatList.length; ++i)
$root.cs.LastChatData.encode(message.LastChatList[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
return writer;
};
/**
* Encodes the specified CSGetLastChatListRes message, length delimited. Does not implicitly {@link cs.CSGetLastChatListRes.verify|verify} messages.
* @function encodeDelimited
* @memberof cs.CSGetLastChatListRes
* @static
* @param {cs.ICSGetLastChatListRes} message CSGetLastChatListRes message or plain object to encode
* @param {$protobuf.Writer} [writer] Writer to encode to
* @returns {$protobuf.Writer} Writer
*/
CSGetLastChatListRes.encodeDelimited = function encodeDelimited(message, writer) {
return this.encode(message, writer).ldelim();
};
/**
* Decodes a CSGetLastChatListRes message from the specified reader or buffer.
* @function decode
* @memberof cs.CSGetLastChatListRes
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @param {number} [length] Message length if known beforehand
* @returns {cs.CSGetLastChatListRes} CSGetLastChatListRes
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
CSGetLastChatListRes.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.CSGetLastChatListRes();
while (reader.pos < end) {
var tag = reader.uint32();
if (tag === error)
break;
switch (tag >>> 3) {
case 1: {
if (!(message.LastChatList && message.LastChatList.length))
message.LastChatList = [];
message.LastChatList.push($root.cs.LastChatData.decode(reader, reader.uint32()));
break;
}
default:
reader.skipType(tag & 7);
break;
}
}
return message;
};
/**
* Decodes a CSGetLastChatListRes message from the specified reader or buffer, length delimited.
* @function decodeDelimited
* @memberof cs.CSGetLastChatListRes
* @static
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
* @returns {cs.CSGetLastChatListRes} CSGetLastChatListRes
* @throws {Error} If the payload is not a reader or valid buffer
* @throws {$protobuf.util.ProtocolError} If required fields are missing
*/
CSGetLastChatListRes.decodeDelimited = function decodeDelimited(reader) {
if (!(reader instanceof $Reader))
reader = new $Reader(reader);
return this.decode(reader, reader.uint32());
};
/**
* Verifies a CSGetLastChatListRes message.
* @function verify
* @memberof cs.CSGetLastChatListRes
* @static
* @param {Object.<string,*>} message Plain object to verify
* @returns {string|null} `null` if valid, otherwise the reason why it is not
*/
CSGetLastChatListRes.verify = function verify(message) {
if (typeof message !== "object" || message === null)
return "object expected";
if (message.LastChatList != null && message.hasOwnProperty("LastChatList")) {
if (!Array.isArray(message.LastChatList))
return "LastChatList: array expected";
for (var i = 0; i < message.LastChatList.length; ++i) {
var error = $root.cs.LastChatData.verify(message.LastChatList[i]);
if (error)
return "LastChatList." + error;
}
}
return null;
};
/**
* Creates a CSGetLastChatListRes message from a plain object. Also converts values to their respective internal types.
* @function fromObject
* @memberof cs.CSGetLastChatListRes
* @static
* @param {Object.<string,*>} object Plain object
* @returns {cs.CSGetLastChatListRes} CSGetLastChatListRes
*/
CSGetLastChatListRes.fromObject = function fromObject(object) {
if (object instanceof $root.cs.CSGetLastChatListRes)
return object;
var message = new $root.cs.CSGetLastChatListRes();
if (object.LastChatList) {
if (!Array.isArray(object.LastChatList))
throw TypeError(".cs.CSGetLastChatListRes.LastChatList: array expected");
message.LastChatList = [];
for (var i = 0; i < object.LastChatList.length; ++i) {
if (typeof object.LastChatList[i] !== "object")
throw TypeError(".cs.CSGetLastChatListRes.LastChatList: object expected");
message.LastChatList[i] = $root.cs.LastChatData.fromObject(object.LastChatList[i]);
}
}
return message;
};
/**
* Creates a plain object from a CSGetLastChatListRes message. Also converts values to other types if specified.
* @function toObject
* @memberof cs.CSGetLastChatListRes
* @static
* @param {cs.CSGetLastChatListRes} message CSGetLastChatListRes
* @param {$protobuf.IConversionOptions} [options] Conversion options
* @returns {Object.<string,*>} Plain object
*/
CSGetLastChatListRes.toObject = function toObject(message, options) {
if (!options)
options = {};
var object = {};
if (options.arrays || options.defaults)
object.LastChatList = [];
if (message.LastChatList && message.LastChatList.length) {
object.LastChatList = [];
for (var j = 0; j < message.LastChatList.length; ++j)
object.LastChatList[j] = $root.cs.LastChatData.toObject(message.LastChatList[j], options);
}
return object;
};
/**
* Converts this CSGetLastChatListRes to JSON.
* @function toJSON
* @memberof cs.CSGetLastChatListRes
* @instance
* @returns {Object.<string,*>} JSON object
*/
CSGetLastChatListRes.prototype.toJSON = function toJSON() {
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
};
/**
* Gets the default type url for CSGetLastChatListRes
* @function getTypeUrl
* @memberof cs.CSGetLastChatListRes
* @static
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
* @returns {string} The default type url
*/
CSGetLastChatListRes.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
if (typeUrlPrefix === undefined) {
typeUrlPrefix = "type.googleapis.com";
}
return typeUrlPrefix + "/cs.CSGetLastChatListRes";
};
return CSGetLastChatListRes;
})();
/**
* Category enum.
* @name cs.Category