diff --git a/assets/Scripts/chat18x/config/GirlDetailConfig.ts b/assets/Scripts/chat18x/config/GirlDetailConfig.ts index f708e52f..2ea766bc 100644 --- a/assets/Scripts/chat18x/config/GirlDetailConfig.ts +++ b/assets/Scripts/chat18x/config/GirlDetailConfig.ts @@ -49,10 +49,10 @@ export class GirlDetailConfig extends BaseConfig { } /** 根据 id 获取 commercialImages数量 */ - public getCommercialImagesCount(id: number): any | null { + public getCommercialImagesCount(id: number): number | null { let oneData = this.getCommercialImagesById(id); if (!oneData) return null; - return oneData.commercialImages.size; + return oneData.length; } /** 根据 id 和 index 获取图片类型 */ @@ -87,10 +87,10 @@ export class GirlDetailConfig extends BaseConfig { } /** 根据 id 获取 commercialVideos数量 */ - public getCommercialVideosCount(id: number): any | null { + public getCommercialVideosCount(id: number): number | null { let oneData = this.getCommercialVideosById(id); if (!oneData) return null; - return oneData.commercialVideos.size; + return oneData.length; } /** 根据 id 和 index 获取视频路径 */ diff --git a/assets/Scripts/chat18x/data/GirlData.ts b/assets/Scripts/chat18x/data/GirlData.ts index 368c147c..6867c8bb 100644 --- a/assets/Scripts/chat18x/data/GirlData.ts +++ b/assets/Scripts/chat18x/data/GirlData.ts @@ -234,7 +234,6 @@ export class GirlData extends BaseData { if (!d) return; // 合并简要信息 if (d.brief) this.mergeBriefs(categoryId, [d.brief]); - const oneDetail = this.parseOneGirlDetail(d); const bucket = this.ensureBucket(categoryId); // id diff --git a/assets/Scripts/chat18x/network/services/MockGirlService.ts b/assets/Scripts/chat18x/network/services/MockGirlService.ts index e76dadf7..8f6d73d5 100644 --- a/assets/Scripts/chat18x/network/services/MockGirlService.ts +++ b/assets/Scripts/chat18x/network/services/MockGirlService.ts @@ -137,6 +137,7 @@ export class MockGirlService implements IGirlService { let photoData = []; let photoCount = girlDetailConfig.getCommercialImagesCount(girlId); + for (let i = 0; i < photoCount; i++) { let imagePath = girlDetailConfig.getImagePathById(girlId, i); let isImageRelease = Math.random() < 0.4; @@ -146,7 +147,7 @@ export class MockGirlService implements IGirlService { } let detail = this.genDetail(briefData, desc, photoData, isRelease, chatCount); - + // 返回数据 return this.ok({ detail }); } } diff --git a/assets/Scripts/chat18x/ui/panels/GirlDetailPanel.ts b/assets/Scripts/chat18x/ui/panels/GirlDetailPanel.ts index 39cc7b0f..3a4aaabc 100644 --- a/assets/Scripts/chat18x/ui/panels/GirlDetailPanel.ts +++ b/assets/Scripts/chat18x/ui/panels/GirlDetailPanel.ts @@ -17,6 +17,10 @@ import Utils from "../../../Main/Common/Utils"; import { InnerMsgCode } from "../../../Main/Config/InnerMsgCode"; import { SimpleToggle } from "../components/SimpleToggle"; import { GirlDetail, purchase } from "../../../schema/schema"; +import { DataManager, DataId } from "../../data/DataManager"; +import { GirlData } from "../../data/GirlData"; +import { GirlService } from "db://assets/Scripts/chat18x/network/services/GirlService"; +import proto from 'db://assets/Scripts/proto/proto.pb.js'; const { ccclass, property } = _decorator; @@ -132,12 +136,62 @@ export class GirlDetailPanel extends li_BaseView { nameKey: string; tagKey: string; category; - refresh(index: number) { + async refresh(index: number) { + // TODO,暂时这样获取,修改后从GirlData获取 + const girlConfig = ConfigManager.tables.TbGirls.get(this.id); + this.category = girlConfig.category; + // 请求详细数据 + const reqData = { + id: this.id, + }; + // let res = await GirlService.I.reqGetGirlDetail(reqData); + // console.log("看看响应数据:", res); + // if (res && res.code === proto.cs.EnmRetCode.SUCCESS) { + // // 保存数据 + // const girlData = DataManager.I.getDataById(DataId.Girl); + // girlData.setGirlDetails(this.category.toString(), res.data); + // // 根据数据,刷新界面 + // this.nameKey = girlData.getGrilName(this.category, this.id); + // this.girlName.string = LanguageUtils.getText(this.nameKey); + // this.desc.string = girlData.getGrilDesc(this.category, this.id); + + // let desc = ""; + // this.tagKey = girlData.getGrilTagKey(this.category, this.id); + // const tags = LanguageUtils.getText(this.tagKey).split("|"); + // for (let i = 0; i < tags.length; i++) { + // if (i != 0) desc += "|"; + // desc += tags[i]; + // } + // this.tags.string = desc; + // for (let i = 0; i < 5; i++) { + // this.starParent.children[i].active = i < 5; + // } + // let age = girlData.getGrilAge(this.category, this.id); + // this.descAge.string = + // LanguageUtils.getText("girldetailpanel.age") + age.toString(); + + // // TODO + // const dataDetail = ConfigManager.tables.TbGirlsDetail.get(this.id); + + // ResManager.I.changeBundleVideo( + // this.avatarVideo, + // dataDetail.commercialVideos[0].path, + // "Chat18x" + // ); + + // // 也立即尝试调整(以防已经加载完成) + // this.adjustVideoScale(); + // this.vids = dataDetail.commercialVideos.slice(0); + // this.refreshImgs(dataDetail.commercialImages); + + + // } + + const dataDetail = ConfigManager.tables.TbGirlsDetail.get(this.id); console.log(dataDetail); const data = ConfigManager.tables.TbGirls.get(this.id); - this.category = data.category; this.nameKey = data.nameKey; this.girlName.string = LanguageUtils.getText(data.nameKey); diff --git a/assets/Scripts/proto/proto.pb.d.ts b/assets/Scripts/proto/proto.pb.d.ts index 6c3a2688..ceff1ac8 100644 --- a/assets/Scripts/proto/proto.pb.d.ts +++ b/assets/Scripts/proto/proto.pb.d.ts @@ -32,6 +32,12 @@ export namespace cs { /** GirlBrief star */ star?: (number|null); + + /** GirlBrief category */ + category?: (number|null); + + /** GirlBrief listAvatarPath */ + listAvatarPath?: (string|null); } /** Represents a GirlBrief. */ @@ -67,6 +73,12 @@ avatar: string; /** GirlBrief star. */ star: number; + /** GirlBrief category. */ +category: number; + + /** GirlBrief listAvatarPath. */ +listAvatarPath: string; + /** * Creates a new GirlBrief instance using the specified properties. * @param [properties] Properties to set @@ -254,6 +266,236 @@ toJSON(): { [k: string]: any }; static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of a PurchaseCommercialImage. */ + interface IPurchaseCommercialImage { + + /** PurchaseCommercialImage imageType */ + imageType?: (number|null); + + /** PurchaseCommercialImage imagePrice */ + imagePrice?: (number|null); + + /** PurchaseCommercialImage path */ + path?: (string|null); + + /** PurchaseCommercialImage isRelease */ + isRelease?: (boolean|null); + } + + /** Represents a PurchaseCommercialImage. */ + class PurchaseCommercialImage implements IPurchaseCommercialImage { + + /** + * Constructs a new PurchaseCommercialImage. + * @param [properties] Properties to set + */ + constructor(properties?: cs.IPurchaseCommercialImage); + + /** PurchaseCommercialImage imageType. */ +imageType: number; + + /** PurchaseCommercialImage imagePrice. */ +imagePrice: number; + + /** PurchaseCommercialImage path. */ +path: string; + + /** PurchaseCommercialImage isRelease. */ +isRelease: boolean; + + /** + * Creates a new PurchaseCommercialImage instance using the specified properties. + * @param [properties] Properties to set + * @returns PurchaseCommercialImage instance + */ +static create(properties?: cs.IPurchaseCommercialImage): cs.PurchaseCommercialImage; + + /** + * Encodes the specified PurchaseCommercialImage message. Does not implicitly {@link cs.PurchaseCommercialImage.verify|verify} messages. + * @param message PurchaseCommercialImage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ +static encode(message: cs.IPurchaseCommercialImage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PurchaseCommercialImage message, length delimited. Does not implicitly {@link cs.PurchaseCommercialImage.verify|verify} messages. + * @param message PurchaseCommercialImage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ +static encodeDelimited(message: cs.IPurchaseCommercialImage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PurchaseCommercialImage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PurchaseCommercialImage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ +static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cs.PurchaseCommercialImage; + + /** + * Decodes a PurchaseCommercialImage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PurchaseCommercialImage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ +static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cs.PurchaseCommercialImage; + + /** + * Verifies a PurchaseCommercialImage message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ +static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PurchaseCommercialImage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PurchaseCommercialImage + */ +static fromObject(object: { [k: string]: any }): cs.PurchaseCommercialImage; + + /** + * Creates a plain object from a PurchaseCommercialImage message. Also converts values to other types if specified. + * @param message PurchaseCommercialImage + * @param [options] Conversion options + * @returns Plain object + */ +static toObject(message: cs.PurchaseCommercialImage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PurchaseCommercialImage to JSON. + * @returns JSON object + */ +toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PurchaseCommercialImage + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ +static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PurchaseCommercialVideo. */ + interface IPurchaseCommercialVideo { + + /** PurchaseCommercialVideo path */ + path?: (string|null); + + /** PurchaseCommercialVideo emotion */ + emotion?: (number|null); + + /** PurchaseCommercialVideo videoPrice */ + videoPrice?: (number|null); + + /** PurchaseCommercialVideo isRelease */ + isRelease?: (boolean|null); + } + + /** Represents a PurchaseCommercialVideo. */ + class PurchaseCommercialVideo implements IPurchaseCommercialVideo { + + /** + * Constructs a new PurchaseCommercialVideo. + * @param [properties] Properties to set + */ + constructor(properties?: cs.IPurchaseCommercialVideo); + + /** PurchaseCommercialVideo path. */ +path: string; + + /** PurchaseCommercialVideo emotion. */ +emotion: number; + + /** PurchaseCommercialVideo videoPrice. */ +videoPrice: number; + + /** PurchaseCommercialVideo isRelease. */ +isRelease: boolean; + + /** + * Creates a new PurchaseCommercialVideo instance using the specified properties. + * @param [properties] Properties to set + * @returns PurchaseCommercialVideo instance + */ +static create(properties?: cs.IPurchaseCommercialVideo): cs.PurchaseCommercialVideo; + + /** + * Encodes the specified PurchaseCommercialVideo message. Does not implicitly {@link cs.PurchaseCommercialVideo.verify|verify} messages. + * @param message PurchaseCommercialVideo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ +static encode(message: cs.IPurchaseCommercialVideo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PurchaseCommercialVideo message, length delimited. Does not implicitly {@link cs.PurchaseCommercialVideo.verify|verify} messages. + * @param message PurchaseCommercialVideo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ +static encodeDelimited(message: cs.IPurchaseCommercialVideo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PurchaseCommercialVideo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PurchaseCommercialVideo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ +static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cs.PurchaseCommercialVideo; + + /** + * Decodes a PurchaseCommercialVideo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PurchaseCommercialVideo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ +static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cs.PurchaseCommercialVideo; + + /** + * Verifies a PurchaseCommercialVideo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ +static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PurchaseCommercialVideo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PurchaseCommercialVideo + */ +static fromObject(object: { [k: string]: any }): cs.PurchaseCommercialVideo; + + /** + * Creates a plain object from a PurchaseCommercialVideo message. Also converts values to other types if specified. + * @param message PurchaseCommercialVideo + * @param [options] Conversion options + * @returns Plain object + */ +static toObject(message: cs.PurchaseCommercialVideo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PurchaseCommercialVideo to JSON. + * @returns JSON object + */ +toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PurchaseCommercialVideo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ +static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of a GirlDetail. */ interface IGirlDetail { @@ -263,14 +505,17 @@ static getTypeUrl(typeUrlPrefix?: string): string; /** GirlDetail desc */ desc?: (string|null); - /** GirlDetail photos */ - photos?: (cs.IGirlPhoto[]|null); - /** GirlDetail isRelease */ isRelease?: (boolean|null); /** GirlDetail chatCount */ chatCount?: (number|null); + + /** GirlDetail images */ + images?: (cs.IPurchaseCommercialImage[]|null); + + /** GirlDetail videos */ + videos?: (cs.IPurchaseCommercialVideo[]|null); } /** Represents a GirlDetail. */ @@ -288,15 +533,18 @@ brief?: (cs.IGirlBrief|null); /** GirlDetail desc. */ desc: string; - /** GirlDetail photos. */ -photos: cs.IGirlPhoto[]; - /** GirlDetail isRelease. */ isRelease: boolean; /** GirlDetail chatCount. */ chatCount: number; + /** GirlDetail images. */ +images: cs.IPurchaseCommercialImage[]; + + /** GirlDetail videos. */ +videos: cs.IPurchaseCommercialVideo[]; + /** * Creates a new GirlDetail instance using the specified properties. * @param [properties] Properties to set @@ -2193,6 +2441,497 @@ toJSON(): { [k: string]: any }; static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of a ChatMsg. */ + interface IChatMsg { + + /** ChatMsg msg */ + msg?: (string|null); + + /** ChatMsg isAi */ + isAi?: (boolean|null); + } + + /** Represents a ChatMsg. */ + class ChatMsg implements IChatMsg { + + /** + * Constructs a new ChatMsg. + * @param [properties] Properties to set + */ + constructor(properties?: cs.IChatMsg); + + /** ChatMsg msg. */ +msg: string; + + /** ChatMsg isAi. */ +isAi: boolean; + + /** + * Creates a new ChatMsg instance using the specified properties. + * @param [properties] Properties to set + * @returns ChatMsg instance + */ +static create(properties?: cs.IChatMsg): cs.ChatMsg; + + /** + * Encodes the specified ChatMsg message. Does not implicitly {@link cs.ChatMsg.verify|verify} messages. + * @param message ChatMsg message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ +static encode(message: cs.IChatMsg, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ChatMsg message, length delimited. Does not implicitly {@link cs.ChatMsg.verify|verify} messages. + * @param message ChatMsg message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ +static encodeDelimited(message: cs.IChatMsg, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ChatMsg message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ChatMsg + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ +static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cs.ChatMsg; + + /** + * Decodes a ChatMsg message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ChatMsg + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ +static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cs.ChatMsg; + + /** + * Verifies a ChatMsg message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ +static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ChatMsg message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ChatMsg + */ +static fromObject(object: { [k: string]: any }): cs.ChatMsg; + + /** + * Creates a plain object from a ChatMsg message. Also converts values to other types if specified. + * @param message ChatMsg + * @param [options] Conversion options + * @returns Plain object + */ +static toObject(message: cs.ChatMsg, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ChatMsg to JSON. + * @returns JSON object + */ +toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ChatMsg + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ +static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CSChatMsgReq. */ + interface ICSChatMsgReq { + + /** CSChatMsgReq msgs */ + msgs?: (cs.IChatMsg[]|null); + } + + /** Represents a CSChatMsgReq. */ + class CSChatMsgReq implements ICSChatMsgReq { + + /** + * Constructs a new CSChatMsgReq. + * @param [properties] Properties to set + */ + constructor(properties?: cs.ICSChatMsgReq); + + /** CSChatMsgReq msgs. */ +msgs: cs.IChatMsg[]; + + /** + * Creates a new CSChatMsgReq instance using the specified properties. + * @param [properties] Properties to set + * @returns CSChatMsgReq instance + */ +static create(properties?: cs.ICSChatMsgReq): cs.CSChatMsgReq; + + /** + * Encodes the specified CSChatMsgReq message. Does not implicitly {@link cs.CSChatMsgReq.verify|verify} messages. + * @param message CSChatMsgReq message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ +static encode(message: cs.ICSChatMsgReq, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CSChatMsgReq message, length delimited. Does not implicitly {@link cs.CSChatMsgReq.verify|verify} messages. + * @param message CSChatMsgReq message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ +static encodeDelimited(message: cs.ICSChatMsgReq, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CSChatMsgReq message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CSChatMsgReq + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ +static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cs.CSChatMsgReq; + + /** + * Decodes a CSChatMsgReq message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CSChatMsgReq + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ +static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cs.CSChatMsgReq; + + /** + * Verifies a CSChatMsgReq message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ +static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CSChatMsgReq message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CSChatMsgReq + */ +static fromObject(object: { [k: string]: any }): cs.CSChatMsgReq; + + /** + * Creates a plain object from a CSChatMsgReq message. Also converts values to other types if specified. + * @param message CSChatMsgReq + * @param [options] Conversion options + * @returns Plain object + */ +static toObject(message: cs.CSChatMsgReq, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CSChatMsgReq to JSON. + * @returns JSON object + */ +toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CSChatMsgReq + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ +static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CSChatMsgRes. */ + interface ICSChatMsgRes { + } + + /** Represents a CSChatMsgRes. */ + class CSChatMsgRes implements ICSChatMsgRes { + + /** + * Constructs a new CSChatMsgRes. + * @param [properties] Properties to set + */ + constructor(properties?: cs.ICSChatMsgRes); + + /** + * Creates a new CSChatMsgRes instance using the specified properties. + * @param [properties] Properties to set + * @returns CSChatMsgRes instance + */ +static create(properties?: cs.ICSChatMsgRes): cs.CSChatMsgRes; + + /** + * Encodes the specified CSChatMsgRes message. Does not implicitly {@link cs.CSChatMsgRes.verify|verify} messages. + * @param message CSChatMsgRes message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ +static encode(message: cs.ICSChatMsgRes, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CSChatMsgRes message, length delimited. Does not implicitly {@link cs.CSChatMsgRes.verify|verify} messages. + * @param message CSChatMsgRes message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ +static encodeDelimited(message: cs.ICSChatMsgRes, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CSChatMsgRes message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CSChatMsgRes + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ +static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cs.CSChatMsgRes; + + /** + * Decodes a CSChatMsgRes message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CSChatMsgRes + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ +static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cs.CSChatMsgRes; + + /** + * Verifies a CSChatMsgRes message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ +static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CSChatMsgRes message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CSChatMsgRes + */ +static fromObject(object: { [k: string]: any }): cs.CSChatMsgRes; + + /** + * Creates a plain object from a CSChatMsgRes message. Also converts values to other types if specified. + * @param message CSChatMsgRes + * @param [options] Conversion options + * @returns Plain object + */ +static toObject(message: cs.CSChatMsgRes, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CSChatMsgRes to JSON. + * @returns JSON object + */ +toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CSChatMsgRes + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ +static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CSGetChatMsgReq. */ + interface ICSGetChatMsgReq { + + /** CSGetChatMsgReq page */ + page?: (number|null); + + /** CSGetChatMsgReq limit */ + limit?: (number|null); + } + + /** Represents a CSGetChatMsgReq. */ + class CSGetChatMsgReq implements ICSGetChatMsgReq { + + /** + * Constructs a new CSGetChatMsgReq. + * @param [properties] Properties to set + */ + constructor(properties?: cs.ICSGetChatMsgReq); + + /** CSGetChatMsgReq page. */ +page: number; + + /** CSGetChatMsgReq limit. */ +limit: number; + + /** + * Creates a new CSGetChatMsgReq instance using the specified properties. + * @param [properties] Properties to set + * @returns CSGetChatMsgReq instance + */ +static create(properties?: cs.ICSGetChatMsgReq): cs.CSGetChatMsgReq; + + /** + * Encodes the specified CSGetChatMsgReq message. Does not implicitly {@link cs.CSGetChatMsgReq.verify|verify} messages. + * @param message CSGetChatMsgReq message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ +static encode(message: cs.ICSGetChatMsgReq, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CSGetChatMsgReq message, length delimited. Does not implicitly {@link cs.CSGetChatMsgReq.verify|verify} messages. + * @param message CSGetChatMsgReq message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ +static encodeDelimited(message: cs.ICSGetChatMsgReq, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CSGetChatMsgReq message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CSGetChatMsgReq + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ +static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cs.CSGetChatMsgReq; + + /** + * Decodes a CSGetChatMsgReq message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CSGetChatMsgReq + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ +static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cs.CSGetChatMsgReq; + + /** + * Verifies a CSGetChatMsgReq message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ +static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CSGetChatMsgReq message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CSGetChatMsgReq + */ +static fromObject(object: { [k: string]: any }): cs.CSGetChatMsgReq; + + /** + * Creates a plain object from a CSGetChatMsgReq message. Also converts values to other types if specified. + * @param message CSGetChatMsgReq + * @param [options] Conversion options + * @returns Plain object + */ +static toObject(message: cs.CSGetChatMsgReq, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CSGetChatMsgReq to JSON. + * @returns JSON object + */ +toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CSGetChatMsgReq + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ +static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CSGetChatMsgRes. */ + interface ICSGetChatMsgRes { + + /** CSGetChatMsgRes msgs */ + msgs?: (cs.IChatMsg[]|null); + } + + /** Represents a CSGetChatMsgRes. */ + class CSGetChatMsgRes implements ICSGetChatMsgRes { + + /** + * Constructs a new CSGetChatMsgRes. + * @param [properties] Properties to set + */ + constructor(properties?: cs.ICSGetChatMsgRes); + + /** CSGetChatMsgRes msgs. */ +msgs: cs.IChatMsg[]; + + /** + * Creates a new CSGetChatMsgRes instance using the specified properties. + * @param [properties] Properties to set + * @returns CSGetChatMsgRes instance + */ +static create(properties?: cs.ICSGetChatMsgRes): cs.CSGetChatMsgRes; + + /** + * Encodes the specified CSGetChatMsgRes message. Does not implicitly {@link cs.CSGetChatMsgRes.verify|verify} messages. + * @param message CSGetChatMsgRes message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ +static encode(message: cs.ICSGetChatMsgRes, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CSGetChatMsgRes message, length delimited. Does not implicitly {@link cs.CSGetChatMsgRes.verify|verify} messages. + * @param message CSGetChatMsgRes message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ +static encodeDelimited(message: cs.ICSGetChatMsgRes, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CSGetChatMsgRes message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CSGetChatMsgRes + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ +static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cs.CSGetChatMsgRes; + + /** + * Decodes a CSGetChatMsgRes message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CSGetChatMsgRes + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ +static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cs.CSGetChatMsgRes; + + /** + * Verifies a CSGetChatMsgRes message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ +static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CSGetChatMsgRes message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CSGetChatMsgRes + */ +static fromObject(object: { [k: string]: any }): cs.CSGetChatMsgRes; + + /** + * Creates a plain object from a CSGetChatMsgRes message. Also converts values to other types if specified. + * @param message CSGetChatMsgRes + * @param [options] Conversion options + * @returns Plain object + */ +static toObject(message: cs.CSGetChatMsgRes, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CSGetChatMsgRes to JSON. + * @returns JSON object + */ +toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CSGetChatMsgRes + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ +static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of a CSLoginReq. */ interface ICSLoginReq { diff --git a/assets/Scripts/proto/proto.pb.js b/assets/Scripts/proto/proto.pb.js index 797283f9..31b91b5d 100644 --- a/assets/Scripts/proto/proto.pb.js +++ b/assets/Scripts/proto/proto.pb.js @@ -32,6 +32,8 @@ $root.cs = (function() { * @property {number|Long|null} [price] GirlBrief price * @property {string|null} [avatar] GirlBrief avatar * @property {number|null} [star] GirlBrief star + * @property {number|null} [category] GirlBrief category + * @property {string|null} [listAvatarPath] GirlBrief listAvatarPath */ /** @@ -113,6 +115,22 @@ $root.cs = (function() { */ GirlBrief.prototype.star = 0; + /** + * GirlBrief category. + * @member {number} category + * @memberof cs.GirlBrief + * @instance + */ + GirlBrief.prototype.category = 0; + + /** + * GirlBrief listAvatarPath. + * @member {string} listAvatarPath + * @memberof cs.GirlBrief + * @instance + */ + GirlBrief.prototype.listAvatarPath = ""; + /** * Creates a new GirlBrief instance using the specified properties. * @function create @@ -153,6 +171,10 @@ $root.cs = (function() { 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); + if (message.category != null && Object.hasOwnProperty.call(message, "category")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.category); + if (message.listAvatarPath != null && Object.hasOwnProperty.call(message, "listAvatarPath")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.listAvatarPath); return writer; }; @@ -221,6 +243,14 @@ $root.cs = (function() { message.star = reader.int32(); break; } + case 9: { + message.category = reader.int32(); + break; + } + case 10: { + message.listAvatarPath = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -280,6 +310,12 @@ $root.cs = (function() { if (message.star != null && message.hasOwnProperty("star")) if (!$util.isInteger(message.star)) return "star: integer expected"; + if (message.category != null && message.hasOwnProperty("category")) + if (!$util.isInteger(message.category)) + return "category: integer expected"; + if (message.listAvatarPath != null && message.hasOwnProperty("listAvatarPath")) + if (!$util.isString(message.listAvatarPath)) + return "listAvatarPath: string expected"; return null; }; @@ -318,6 +354,10 @@ $root.cs = (function() { message.avatar = String(object.avatar); if (object.star != null) message.star = object.star | 0; + if (object.category != null) + message.category = object.category | 0; + if (object.listAvatarPath != null) + message.listAvatarPath = String(object.listAvatarPath); return message; }; @@ -347,6 +387,8 @@ $root.cs = (function() { object.price = options.longs === String ? "0" : 0; object.avatar = ""; object.star = 0; + object.category = 0; + object.listAvatarPath = ""; } if (message.id != null && message.hasOwnProperty("id")) object.id = message.id; @@ -367,6 +409,10 @@ $root.cs = (function() { object.avatar = message.avatar; if (message.star != null && message.hasOwnProperty("star")) object.star = message.star; + if (message.category != null && message.hasOwnProperty("category")) + object.category = message.category; + if (message.listAvatarPath != null && message.hasOwnProperty("listAvatarPath")) + object.listAvatarPath = message.listAvatarPath; return object; }; @@ -651,6 +697,556 @@ $root.cs = (function() { return GirlPhoto; })(); + cs.PurchaseCommercialImage = (function() { + + /** + * Properties of a PurchaseCommercialImage. + * @memberof cs + * @interface IPurchaseCommercialImage + * @property {number|null} [imageType] PurchaseCommercialImage imageType + * @property {number|null} [imagePrice] PurchaseCommercialImage imagePrice + * @property {string|null} [path] PurchaseCommercialImage path + * @property {boolean|null} [isRelease] PurchaseCommercialImage isRelease + */ + + /** + * Constructs a new PurchaseCommercialImage. + * @memberof cs + * @classdesc Represents a PurchaseCommercialImage. + * @implements IPurchaseCommercialImage + * @constructor + * @param {cs.IPurchaseCommercialImage=} [properties] Properties to set + */ + function PurchaseCommercialImage(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PurchaseCommercialImage imageType. + * @member {number} imageType + * @memberof cs.PurchaseCommercialImage + * @instance + */ + PurchaseCommercialImage.prototype.imageType = 0; + + /** + * PurchaseCommercialImage imagePrice. + * @member {number} imagePrice + * @memberof cs.PurchaseCommercialImage + * @instance + */ + PurchaseCommercialImage.prototype.imagePrice = 0; + + /** + * PurchaseCommercialImage path. + * @member {string} path + * @memberof cs.PurchaseCommercialImage + * @instance + */ + PurchaseCommercialImage.prototype.path = ""; + + /** + * PurchaseCommercialImage isRelease. + * @member {boolean} isRelease + * @memberof cs.PurchaseCommercialImage + * @instance + */ + PurchaseCommercialImage.prototype.isRelease = false; + + /** + * Creates a new PurchaseCommercialImage instance using the specified properties. + * @function create + * @memberof cs.PurchaseCommercialImage + * @static + * @param {cs.IPurchaseCommercialImage=} [properties] Properties to set + * @returns {cs.PurchaseCommercialImage} PurchaseCommercialImage instance + */ + PurchaseCommercialImage.create = function create(properties) { + return new PurchaseCommercialImage(properties); + }; + + /** + * Encodes the specified PurchaseCommercialImage message. Does not implicitly {@link cs.PurchaseCommercialImage.verify|verify} messages. + * @function encode + * @memberof cs.PurchaseCommercialImage + * @static + * @param {cs.IPurchaseCommercialImage} message PurchaseCommercialImage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PurchaseCommercialImage.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.imageType != null && Object.hasOwnProperty.call(message, "imageType")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.imageType); + if (message.imagePrice != null && Object.hasOwnProperty.call(message, "imagePrice")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.imagePrice); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.path); + if (message.isRelease != null && Object.hasOwnProperty.call(message, "isRelease")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.isRelease); + return writer; + }; + + /** + * Encodes the specified PurchaseCommercialImage message, length delimited. Does not implicitly {@link cs.PurchaseCommercialImage.verify|verify} messages. + * @function encodeDelimited + * @memberof cs.PurchaseCommercialImage + * @static + * @param {cs.IPurchaseCommercialImage} message PurchaseCommercialImage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PurchaseCommercialImage.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PurchaseCommercialImage message from the specified reader or buffer. + * @function decode + * @memberof cs.PurchaseCommercialImage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cs.PurchaseCommercialImage} PurchaseCommercialImage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PurchaseCommercialImage.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cs.PurchaseCommercialImage(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.imageType = reader.int32(); + break; + } + case 2: { + message.imagePrice = reader.int32(); + break; + } + case 3: { + message.path = reader.string(); + break; + } + case 4: { + message.isRelease = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PurchaseCommercialImage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cs.PurchaseCommercialImage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cs.PurchaseCommercialImage} PurchaseCommercialImage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PurchaseCommercialImage.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PurchaseCommercialImage message. + * @function verify + * @memberof cs.PurchaseCommercialImage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PurchaseCommercialImage.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.imageType != null && message.hasOwnProperty("imageType")) + if (!$util.isInteger(message.imageType)) + return "imageType: integer expected"; + if (message.imagePrice != null && message.hasOwnProperty("imagePrice")) + if (!$util.isInteger(message.imagePrice)) + return "imagePrice: integer expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; + if (message.isRelease != null && message.hasOwnProperty("isRelease")) + if (typeof message.isRelease !== "boolean") + return "isRelease: boolean expected"; + return null; + }; + + /** + * Creates a PurchaseCommercialImage message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cs.PurchaseCommercialImage + * @static + * @param {Object.} object Plain object + * @returns {cs.PurchaseCommercialImage} PurchaseCommercialImage + */ + PurchaseCommercialImage.fromObject = function fromObject(object) { + if (object instanceof $root.cs.PurchaseCommercialImage) + return object; + var message = new $root.cs.PurchaseCommercialImage(); + if (object.imageType != null) + message.imageType = object.imageType | 0; + if (object.imagePrice != null) + message.imagePrice = object.imagePrice | 0; + if (object.path != null) + message.path = String(object.path); + if (object.isRelease != null) + message.isRelease = Boolean(object.isRelease); + return message; + }; + + /** + * Creates a plain object from a PurchaseCommercialImage message. Also converts values to other types if specified. + * @function toObject + * @memberof cs.PurchaseCommercialImage + * @static + * @param {cs.PurchaseCommercialImage} message PurchaseCommercialImage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PurchaseCommercialImage.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.imageType = 0; + object.imagePrice = 0; + object.path = ""; + object.isRelease = false; + } + if (message.imageType != null && message.hasOwnProperty("imageType")) + object.imageType = message.imageType; + if (message.imagePrice != null && message.hasOwnProperty("imagePrice")) + object.imagePrice = message.imagePrice; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + if (message.isRelease != null && message.hasOwnProperty("isRelease")) + object.isRelease = message.isRelease; + return object; + }; + + /** + * Converts this PurchaseCommercialImage to JSON. + * @function toJSON + * @memberof cs.PurchaseCommercialImage + * @instance + * @returns {Object.} JSON object + */ + PurchaseCommercialImage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PurchaseCommercialImage + * @function getTypeUrl + * @memberof cs.PurchaseCommercialImage + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PurchaseCommercialImage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/cs.PurchaseCommercialImage"; + }; + + return PurchaseCommercialImage; + })(); + + cs.PurchaseCommercialVideo = (function() { + + /** + * Properties of a PurchaseCommercialVideo. + * @memberof cs + * @interface IPurchaseCommercialVideo + * @property {string|null} [path] PurchaseCommercialVideo path + * @property {number|null} [emotion] PurchaseCommercialVideo emotion + * @property {number|null} [videoPrice] PurchaseCommercialVideo videoPrice + * @property {boolean|null} [isRelease] PurchaseCommercialVideo isRelease + */ + + /** + * Constructs a new PurchaseCommercialVideo. + * @memberof cs + * @classdesc Represents a PurchaseCommercialVideo. + * @implements IPurchaseCommercialVideo + * @constructor + * @param {cs.IPurchaseCommercialVideo=} [properties] Properties to set + */ + function PurchaseCommercialVideo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PurchaseCommercialVideo path. + * @member {string} path + * @memberof cs.PurchaseCommercialVideo + * @instance + */ + PurchaseCommercialVideo.prototype.path = ""; + + /** + * PurchaseCommercialVideo emotion. + * @member {number} emotion + * @memberof cs.PurchaseCommercialVideo + * @instance + */ + PurchaseCommercialVideo.prototype.emotion = 0; + + /** + * PurchaseCommercialVideo videoPrice. + * @member {number} videoPrice + * @memberof cs.PurchaseCommercialVideo + * @instance + */ + PurchaseCommercialVideo.prototype.videoPrice = 0; + + /** + * PurchaseCommercialVideo isRelease. + * @member {boolean} isRelease + * @memberof cs.PurchaseCommercialVideo + * @instance + */ + PurchaseCommercialVideo.prototype.isRelease = false; + + /** + * Creates a new PurchaseCommercialVideo instance using the specified properties. + * @function create + * @memberof cs.PurchaseCommercialVideo + * @static + * @param {cs.IPurchaseCommercialVideo=} [properties] Properties to set + * @returns {cs.PurchaseCommercialVideo} PurchaseCommercialVideo instance + */ + PurchaseCommercialVideo.create = function create(properties) { + return new PurchaseCommercialVideo(properties); + }; + + /** + * Encodes the specified PurchaseCommercialVideo message. Does not implicitly {@link cs.PurchaseCommercialVideo.verify|verify} messages. + * @function encode + * @memberof cs.PurchaseCommercialVideo + * @static + * @param {cs.IPurchaseCommercialVideo} message PurchaseCommercialVideo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PurchaseCommercialVideo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.path); + if (message.emotion != null && Object.hasOwnProperty.call(message, "emotion")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.emotion); + if (message.videoPrice != null && Object.hasOwnProperty.call(message, "videoPrice")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.videoPrice); + if (message.isRelease != null && Object.hasOwnProperty.call(message, "isRelease")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.isRelease); + return writer; + }; + + /** + * Encodes the specified PurchaseCommercialVideo message, length delimited. Does not implicitly {@link cs.PurchaseCommercialVideo.verify|verify} messages. + * @function encodeDelimited + * @memberof cs.PurchaseCommercialVideo + * @static + * @param {cs.IPurchaseCommercialVideo} message PurchaseCommercialVideo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PurchaseCommercialVideo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PurchaseCommercialVideo message from the specified reader or buffer. + * @function decode + * @memberof cs.PurchaseCommercialVideo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cs.PurchaseCommercialVideo} PurchaseCommercialVideo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PurchaseCommercialVideo.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cs.PurchaseCommercialVideo(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.path = reader.string(); + break; + } + case 2: { + message.emotion = reader.int32(); + break; + } + case 3: { + message.videoPrice = reader.int32(); + break; + } + case 4: { + message.isRelease = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PurchaseCommercialVideo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cs.PurchaseCommercialVideo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cs.PurchaseCommercialVideo} PurchaseCommercialVideo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PurchaseCommercialVideo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PurchaseCommercialVideo message. + * @function verify + * @memberof cs.PurchaseCommercialVideo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PurchaseCommercialVideo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; + if (message.emotion != null && message.hasOwnProperty("emotion")) + if (!$util.isInteger(message.emotion)) + return "emotion: integer expected"; + if (message.videoPrice != null && message.hasOwnProperty("videoPrice")) + if (!$util.isInteger(message.videoPrice)) + return "videoPrice: integer expected"; + if (message.isRelease != null && message.hasOwnProperty("isRelease")) + if (typeof message.isRelease !== "boolean") + return "isRelease: boolean expected"; + return null; + }; + + /** + * Creates a PurchaseCommercialVideo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cs.PurchaseCommercialVideo + * @static + * @param {Object.} object Plain object + * @returns {cs.PurchaseCommercialVideo} PurchaseCommercialVideo + */ + PurchaseCommercialVideo.fromObject = function fromObject(object) { + if (object instanceof $root.cs.PurchaseCommercialVideo) + return object; + var message = new $root.cs.PurchaseCommercialVideo(); + if (object.path != null) + message.path = String(object.path); + if (object.emotion != null) + message.emotion = object.emotion | 0; + if (object.videoPrice != null) + message.videoPrice = object.videoPrice | 0; + if (object.isRelease != null) + message.isRelease = Boolean(object.isRelease); + return message; + }; + + /** + * Creates a plain object from a PurchaseCommercialVideo message. Also converts values to other types if specified. + * @function toObject + * @memberof cs.PurchaseCommercialVideo + * @static + * @param {cs.PurchaseCommercialVideo} message PurchaseCommercialVideo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PurchaseCommercialVideo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.path = ""; + object.emotion = 0; + object.videoPrice = 0; + object.isRelease = false; + } + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + if (message.emotion != null && message.hasOwnProperty("emotion")) + object.emotion = message.emotion; + if (message.videoPrice != null && message.hasOwnProperty("videoPrice")) + object.videoPrice = message.videoPrice; + if (message.isRelease != null && message.hasOwnProperty("isRelease")) + object.isRelease = message.isRelease; + return object; + }; + + /** + * Converts this PurchaseCommercialVideo to JSON. + * @function toJSON + * @memberof cs.PurchaseCommercialVideo + * @instance + * @returns {Object.} JSON object + */ + PurchaseCommercialVideo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PurchaseCommercialVideo + * @function getTypeUrl + * @memberof cs.PurchaseCommercialVideo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PurchaseCommercialVideo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/cs.PurchaseCommercialVideo"; + }; + + return PurchaseCommercialVideo; + })(); + cs.GirlDetail = (function() { /** @@ -659,9 +1255,10 @@ $root.cs = (function() { * @interface IGirlDetail * @property {cs.IGirlBrief|null} [brief] GirlDetail brief * @property {string|null} [desc] GirlDetail desc - * @property {Array.|null} [photos] GirlDetail photos * @property {boolean|null} [isRelease] GirlDetail isRelease * @property {number|null} [chatCount] GirlDetail chatCount + * @property {Array.|null} [images] GirlDetail images + * @property {Array.|null} [videos] GirlDetail videos */ /** @@ -673,7 +1270,8 @@ $root.cs = (function() { * @param {cs.IGirlDetail=} [properties] Properties to set */ function GirlDetail(properties) { - this.photos = []; + this.images = []; + this.videos = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -696,14 +1294,6 @@ $root.cs = (function() { */ GirlDetail.prototype.desc = ""; - /** - * GirlDetail photos. - * @member {Array.} photos - * @memberof cs.GirlDetail - * @instance - */ - GirlDetail.prototype.photos = $util.emptyArray; - /** * GirlDetail isRelease. * @member {boolean} isRelease @@ -720,6 +1310,22 @@ $root.cs = (function() { */ GirlDetail.prototype.chatCount = 0; + /** + * GirlDetail images. + * @member {Array.} images + * @memberof cs.GirlDetail + * @instance + */ + GirlDetail.prototype.images = $util.emptyArray; + + /** + * GirlDetail videos. + * @member {Array.} videos + * @memberof cs.GirlDetail + * @instance + */ + GirlDetail.prototype.videos = $util.emptyArray; + /** * Creates a new GirlDetail instance using the specified properties. * @function create @@ -748,13 +1354,16 @@ $root.cs = (function() { $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.photos != null && message.photos.length) - for (var i = 0; i < message.photos.length; ++i) - $root.cs.GirlPhoto.encode(message.photos[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); if (message.isRelease != null && Object.hasOwnProperty.call(message, "isRelease")) writer.uint32(/* id 4, wireType 0 =*/32).bool(message.isRelease); if (message.chatCount != null && Object.hasOwnProperty.call(message, "chatCount")) writer.uint32(/* id 5, wireType 0 =*/40).int32(message.chatCount); + if (message.images != null && message.images.length) + for (var i = 0; i < message.images.length; ++i) + $root.cs.PurchaseCommercialImage.encode(message.images[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.videos != null && message.videos.length) + for (var i = 0; i < message.videos.length; ++i) + $root.cs.PurchaseCommercialVideo.encode(message.videos[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); return writer; }; @@ -799,12 +1408,6 @@ $root.cs = (function() { message.desc = reader.string(); break; } - case 3: { - if (!(message.photos && message.photos.length)) - message.photos = []; - message.photos.push($root.cs.GirlPhoto.decode(reader, reader.uint32())); - break; - } case 4: { message.isRelease = reader.bool(); break; @@ -813,6 +1416,18 @@ $root.cs = (function() { message.chatCount = reader.int32(); break; } + case 6: { + if (!(message.images && message.images.length)) + message.images = []; + message.images.push($root.cs.PurchaseCommercialImage.decode(reader, reader.uint32())); + break; + } + case 7: { + if (!(message.videos && message.videos.length)) + message.videos = []; + message.videos.push($root.cs.PurchaseCommercialVideo.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -856,21 +1471,30 @@ $root.cs = (function() { if (message.desc != null && message.hasOwnProperty("desc")) if (!$util.isString(message.desc)) return "desc: string expected"; - if (message.photos != null && message.hasOwnProperty("photos")) { - if (!Array.isArray(message.photos)) - return "photos: array expected"; - for (var i = 0; i < message.photos.length; ++i) { - var error = $root.cs.GirlPhoto.verify(message.photos[i]); - if (error) - return "photos." + error; - } - } if (message.isRelease != null && message.hasOwnProperty("isRelease")) if (typeof message.isRelease !== "boolean") return "isRelease: boolean expected"; if (message.chatCount != null && message.hasOwnProperty("chatCount")) if (!$util.isInteger(message.chatCount)) return "chatCount: integer expected"; + if (message.images != null && message.hasOwnProperty("images")) { + if (!Array.isArray(message.images)) + return "images: array expected"; + for (var i = 0; i < message.images.length; ++i) { + var error = $root.cs.PurchaseCommercialImage.verify(message.images[i]); + if (error) + return "images." + error; + } + } + if (message.videos != null && message.hasOwnProperty("videos")) { + if (!Array.isArray(message.videos)) + return "videos: array expected"; + for (var i = 0; i < message.videos.length; ++i) { + var error = $root.cs.PurchaseCommercialVideo.verify(message.videos[i]); + if (error) + return "videos." + error; + } + } return null; }; @@ -893,20 +1517,30 @@ $root.cs = (function() { } if (object.desc != null) message.desc = String(object.desc); - if (object.photos) { - if (!Array.isArray(object.photos)) - throw TypeError(".cs.GirlDetail.photos: array expected"); - message.photos = []; - for (var i = 0; i < object.photos.length; ++i) { - if (typeof object.photos[i] !== "object") - throw TypeError(".cs.GirlDetail.photos: object expected"); - message.photos[i] = $root.cs.GirlPhoto.fromObject(object.photos[i]); - } - } if (object.isRelease != null) message.isRelease = Boolean(object.isRelease); if (object.chatCount != null) message.chatCount = object.chatCount | 0; + if (object.images) { + if (!Array.isArray(object.images)) + throw TypeError(".cs.GirlDetail.images: array expected"); + message.images = []; + for (var i = 0; i < object.images.length; ++i) { + if (typeof object.images[i] !== "object") + throw TypeError(".cs.GirlDetail.images: object expected"); + message.images[i] = $root.cs.PurchaseCommercialImage.fromObject(object.images[i]); + } + } + if (object.videos) { + if (!Array.isArray(object.videos)) + throw TypeError(".cs.GirlDetail.videos: array expected"); + message.videos = []; + for (var i = 0; i < object.videos.length; ++i) { + if (typeof object.videos[i] !== "object") + throw TypeError(".cs.GirlDetail.videos: object expected"); + message.videos[i] = $root.cs.PurchaseCommercialVideo.fromObject(object.videos[i]); + } + } return message; }; @@ -923,8 +1557,10 @@ $root.cs = (function() { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.photos = []; + if (options.arrays || options.defaults) { + object.images = []; + object.videos = []; + } if (options.defaults) { object.brief = null; object.desc = ""; @@ -935,15 +1571,20 @@ $root.cs = (function() { object.brief = $root.cs.GirlBrief.toObject(message.brief, options); if (message.desc != null && message.hasOwnProperty("desc")) object.desc = message.desc; - if (message.photos && message.photos.length) { - object.photos = []; - for (var j = 0; j < message.photos.length; ++j) - object.photos[j] = $root.cs.GirlPhoto.toObject(message.photos[j], options); - } if (message.isRelease != null && message.hasOwnProperty("isRelease")) object.isRelease = message.isRelease; if (message.chatCount != null && message.hasOwnProperty("chatCount")) object.chatCount = message.chatCount; + if (message.images && message.images.length) { + object.images = []; + for (var j = 0; j < message.images.length; ++j) + object.images[j] = $root.cs.PurchaseCommercialImage.toObject(message.images[j], options); + } + if (message.videos && message.videos.length) { + object.videos = []; + for (var j = 0; j < message.videos.length; ++j) + object.videos[j] = $root.cs.PurchaseCommercialVideo.toObject(message.videos[j], options); + } return object; }; @@ -5045,6 +5686,1093 @@ $root.cs = (function() { return CSQueryOrderRes; })(); + cs.ChatMsg = (function() { + + /** + * Properties of a ChatMsg. + * @memberof cs + * @interface IChatMsg + * @property {string|null} [msg] ChatMsg msg + * @property {boolean|null} [isAi] ChatMsg isAi + */ + + /** + * Constructs a new ChatMsg. + * @memberof cs + * @classdesc Represents a ChatMsg. + * @implements IChatMsg + * @constructor + * @param {cs.IChatMsg=} [properties] Properties to set + */ + function ChatMsg(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ChatMsg msg. + * @member {string} msg + * @memberof cs.ChatMsg + * @instance + */ + ChatMsg.prototype.msg = ""; + + /** + * ChatMsg isAi. + * @member {boolean} isAi + * @memberof cs.ChatMsg + * @instance + */ + ChatMsg.prototype.isAi = false; + + /** + * Creates a new ChatMsg instance using the specified properties. + * @function create + * @memberof cs.ChatMsg + * @static + * @param {cs.IChatMsg=} [properties] Properties to set + * @returns {cs.ChatMsg} ChatMsg instance + */ + ChatMsg.create = function create(properties) { + return new ChatMsg(properties); + }; + + /** + * Encodes the specified ChatMsg message. Does not implicitly {@link cs.ChatMsg.verify|verify} messages. + * @function encode + * @memberof cs.ChatMsg + * @static + * @param {cs.IChatMsg} message ChatMsg message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ChatMsg.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.msg != null && Object.hasOwnProperty.call(message, "msg")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.msg); + if (message.isAi != null && Object.hasOwnProperty.call(message, "isAi")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.isAi); + return writer; + }; + + /** + * Encodes the specified ChatMsg message, length delimited. Does not implicitly {@link cs.ChatMsg.verify|verify} messages. + * @function encodeDelimited + * @memberof cs.ChatMsg + * @static + * @param {cs.IChatMsg} message ChatMsg message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ChatMsg.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ChatMsg message from the specified reader or buffer. + * @function decode + * @memberof cs.ChatMsg + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cs.ChatMsg} ChatMsg + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ChatMsg.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cs.ChatMsg(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.msg = reader.string(); + break; + } + case 2: { + message.isAi = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ChatMsg message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cs.ChatMsg + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cs.ChatMsg} ChatMsg + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ChatMsg.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ChatMsg message. + * @function verify + * @memberof cs.ChatMsg + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ChatMsg.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.msg != null && message.hasOwnProperty("msg")) + if (!$util.isString(message.msg)) + return "msg: string expected"; + if (message.isAi != null && message.hasOwnProperty("isAi")) + if (typeof message.isAi !== "boolean") + return "isAi: boolean expected"; + return null; + }; + + /** + * Creates a ChatMsg message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cs.ChatMsg + * @static + * @param {Object.} object Plain object + * @returns {cs.ChatMsg} ChatMsg + */ + ChatMsg.fromObject = function fromObject(object) { + if (object instanceof $root.cs.ChatMsg) + return object; + var message = new $root.cs.ChatMsg(); + if (object.msg != null) + message.msg = String(object.msg); + if (object.isAi != null) + message.isAi = Boolean(object.isAi); + return message; + }; + + /** + * Creates a plain object from a ChatMsg message. Also converts values to other types if specified. + * @function toObject + * @memberof cs.ChatMsg + * @static + * @param {cs.ChatMsg} message ChatMsg + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ChatMsg.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.msg = ""; + object.isAi = false; + } + if (message.msg != null && message.hasOwnProperty("msg")) + object.msg = message.msg; + if (message.isAi != null && message.hasOwnProperty("isAi")) + object.isAi = message.isAi; + return object; + }; + + /** + * Converts this ChatMsg to JSON. + * @function toJSON + * @memberof cs.ChatMsg + * @instance + * @returns {Object.} JSON object + */ + ChatMsg.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ChatMsg + * @function getTypeUrl + * @memberof cs.ChatMsg + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ChatMsg.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/cs.ChatMsg"; + }; + + return ChatMsg; + })(); + + cs.CSChatMsgReq = (function() { + + /** + * Properties of a CSChatMsgReq. + * @memberof cs + * @interface ICSChatMsgReq + * @property {Array.|null} [msgs] CSChatMsgReq msgs + */ + + /** + * Constructs a new CSChatMsgReq. + * @memberof cs + * @classdesc Represents a CSChatMsgReq. + * @implements ICSChatMsgReq + * @constructor + * @param {cs.ICSChatMsgReq=} [properties] Properties to set + */ + function CSChatMsgReq(properties) { + this.msgs = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CSChatMsgReq msgs. + * @member {Array.} msgs + * @memberof cs.CSChatMsgReq + * @instance + */ + CSChatMsgReq.prototype.msgs = $util.emptyArray; + + /** + * Creates a new CSChatMsgReq instance using the specified properties. + * @function create + * @memberof cs.CSChatMsgReq + * @static + * @param {cs.ICSChatMsgReq=} [properties] Properties to set + * @returns {cs.CSChatMsgReq} CSChatMsgReq instance + */ + CSChatMsgReq.create = function create(properties) { + return new CSChatMsgReq(properties); + }; + + /** + * Encodes the specified CSChatMsgReq message. Does not implicitly {@link cs.CSChatMsgReq.verify|verify} messages. + * @function encode + * @memberof cs.CSChatMsgReq + * @static + * @param {cs.ICSChatMsgReq} message CSChatMsgReq message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CSChatMsgReq.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.msgs != null && message.msgs.length) + for (var i = 0; i < message.msgs.length; ++i) + $root.cs.ChatMsg.encode(message.msgs[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CSChatMsgReq message, length delimited. Does not implicitly {@link cs.CSChatMsgReq.verify|verify} messages. + * @function encodeDelimited + * @memberof cs.CSChatMsgReq + * @static + * @param {cs.ICSChatMsgReq} message CSChatMsgReq message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CSChatMsgReq.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CSChatMsgReq message from the specified reader or buffer. + * @function decode + * @memberof cs.CSChatMsgReq + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cs.CSChatMsgReq} CSChatMsgReq + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CSChatMsgReq.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cs.CSChatMsgReq(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.msgs && message.msgs.length)) + message.msgs = []; + message.msgs.push($root.cs.ChatMsg.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CSChatMsgReq message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cs.CSChatMsgReq + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cs.CSChatMsgReq} CSChatMsgReq + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CSChatMsgReq.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CSChatMsgReq message. + * @function verify + * @memberof cs.CSChatMsgReq + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CSChatMsgReq.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.msgs != null && message.hasOwnProperty("msgs")) { + if (!Array.isArray(message.msgs)) + return "msgs: array expected"; + for (var i = 0; i < message.msgs.length; ++i) { + var error = $root.cs.ChatMsg.verify(message.msgs[i]); + if (error) + return "msgs." + error; + } + } + return null; + }; + + /** + * Creates a CSChatMsgReq message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cs.CSChatMsgReq + * @static + * @param {Object.} object Plain object + * @returns {cs.CSChatMsgReq} CSChatMsgReq + */ + CSChatMsgReq.fromObject = function fromObject(object) { + if (object instanceof $root.cs.CSChatMsgReq) + return object; + var message = new $root.cs.CSChatMsgReq(); + if (object.msgs) { + if (!Array.isArray(object.msgs)) + throw TypeError(".cs.CSChatMsgReq.msgs: array expected"); + message.msgs = []; + for (var i = 0; i < object.msgs.length; ++i) { + if (typeof object.msgs[i] !== "object") + throw TypeError(".cs.CSChatMsgReq.msgs: object expected"); + message.msgs[i] = $root.cs.ChatMsg.fromObject(object.msgs[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a CSChatMsgReq message. Also converts values to other types if specified. + * @function toObject + * @memberof cs.CSChatMsgReq + * @static + * @param {cs.CSChatMsgReq} message CSChatMsgReq + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CSChatMsgReq.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.msgs = []; + if (message.msgs && message.msgs.length) { + object.msgs = []; + for (var j = 0; j < message.msgs.length; ++j) + object.msgs[j] = $root.cs.ChatMsg.toObject(message.msgs[j], options); + } + return object; + }; + + /** + * Converts this CSChatMsgReq to JSON. + * @function toJSON + * @memberof cs.CSChatMsgReq + * @instance + * @returns {Object.} JSON object + */ + CSChatMsgReq.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CSChatMsgReq + * @function getTypeUrl + * @memberof cs.CSChatMsgReq + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CSChatMsgReq.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/cs.CSChatMsgReq"; + }; + + return CSChatMsgReq; + })(); + + cs.CSChatMsgRes = (function() { + + /** + * Properties of a CSChatMsgRes. + * @memberof cs + * @interface ICSChatMsgRes + */ + + /** + * Constructs a new CSChatMsgRes. + * @memberof cs + * @classdesc Represents a CSChatMsgRes. + * @implements ICSChatMsgRes + * @constructor + * @param {cs.ICSChatMsgRes=} [properties] Properties to set + */ + function CSChatMsgRes(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new CSChatMsgRes instance using the specified properties. + * @function create + * @memberof cs.CSChatMsgRes + * @static + * @param {cs.ICSChatMsgRes=} [properties] Properties to set + * @returns {cs.CSChatMsgRes} CSChatMsgRes instance + */ + CSChatMsgRes.create = function create(properties) { + return new CSChatMsgRes(properties); + }; + + /** + * Encodes the specified CSChatMsgRes message. Does not implicitly {@link cs.CSChatMsgRes.verify|verify} messages. + * @function encode + * @memberof cs.CSChatMsgRes + * @static + * @param {cs.ICSChatMsgRes} message CSChatMsgRes message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CSChatMsgRes.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified CSChatMsgRes message, length delimited. Does not implicitly {@link cs.CSChatMsgRes.verify|verify} messages. + * @function encodeDelimited + * @memberof cs.CSChatMsgRes + * @static + * @param {cs.ICSChatMsgRes} message CSChatMsgRes message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CSChatMsgRes.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CSChatMsgRes message from the specified reader or buffer. + * @function decode + * @memberof cs.CSChatMsgRes + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cs.CSChatMsgRes} CSChatMsgRes + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CSChatMsgRes.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cs.CSChatMsgRes(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CSChatMsgRes message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cs.CSChatMsgRes + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cs.CSChatMsgRes} CSChatMsgRes + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CSChatMsgRes.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CSChatMsgRes message. + * @function verify + * @memberof cs.CSChatMsgRes + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CSChatMsgRes.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a CSChatMsgRes message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cs.CSChatMsgRes + * @static + * @param {Object.} object Plain object + * @returns {cs.CSChatMsgRes} CSChatMsgRes + */ + CSChatMsgRes.fromObject = function fromObject(object) { + if (object instanceof $root.cs.CSChatMsgRes) + return object; + return new $root.cs.CSChatMsgRes(); + }; + + /** + * Creates a plain object from a CSChatMsgRes message. Also converts values to other types if specified. + * @function toObject + * @memberof cs.CSChatMsgRes + * @static + * @param {cs.CSChatMsgRes} message CSChatMsgRes + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CSChatMsgRes.toObject = function toObject() { + return {}; + }; + + /** + * Converts this CSChatMsgRes to JSON. + * @function toJSON + * @memberof cs.CSChatMsgRes + * @instance + * @returns {Object.} JSON object + */ + CSChatMsgRes.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CSChatMsgRes + * @function getTypeUrl + * @memberof cs.CSChatMsgRes + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CSChatMsgRes.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/cs.CSChatMsgRes"; + }; + + return CSChatMsgRes; + })(); + + cs.CSGetChatMsgReq = (function() { + + /** + * Properties of a CSGetChatMsgReq. + * @memberof cs + * @interface ICSGetChatMsgReq + * @property {number|null} [page] CSGetChatMsgReq page + * @property {number|null} [limit] CSGetChatMsgReq limit + */ + + /** + * Constructs a new CSGetChatMsgReq. + * @memberof cs + * @classdesc Represents a CSGetChatMsgReq. + * @implements ICSGetChatMsgReq + * @constructor + * @param {cs.ICSGetChatMsgReq=} [properties] Properties to set + */ + function CSGetChatMsgReq(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CSGetChatMsgReq page. + * @member {number} page + * @memberof cs.CSGetChatMsgReq + * @instance + */ + CSGetChatMsgReq.prototype.page = 0; + + /** + * CSGetChatMsgReq limit. + * @member {number} limit + * @memberof cs.CSGetChatMsgReq + * @instance + */ + CSGetChatMsgReq.prototype.limit = 0; + + /** + * Creates a new CSGetChatMsgReq instance using the specified properties. + * @function create + * @memberof cs.CSGetChatMsgReq + * @static + * @param {cs.ICSGetChatMsgReq=} [properties] Properties to set + * @returns {cs.CSGetChatMsgReq} CSGetChatMsgReq instance + */ + CSGetChatMsgReq.create = function create(properties) { + return new CSGetChatMsgReq(properties); + }; + + /** + * Encodes the specified CSGetChatMsgReq message. Does not implicitly {@link cs.CSGetChatMsgReq.verify|verify} messages. + * @function encode + * @memberof cs.CSGetChatMsgReq + * @static + * @param {cs.ICSGetChatMsgReq} message CSGetChatMsgReq message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CSGetChatMsgReq.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.page != null && Object.hasOwnProperty.call(message, "page")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.page); + if (message.limit != null && Object.hasOwnProperty.call(message, "limit")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.limit); + return writer; + }; + + /** + * Encodes the specified CSGetChatMsgReq message, length delimited. Does not implicitly {@link cs.CSGetChatMsgReq.verify|verify} messages. + * @function encodeDelimited + * @memberof cs.CSGetChatMsgReq + * @static + * @param {cs.ICSGetChatMsgReq} message CSGetChatMsgReq message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CSGetChatMsgReq.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CSGetChatMsgReq message from the specified reader or buffer. + * @function decode + * @memberof cs.CSGetChatMsgReq + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cs.CSGetChatMsgReq} CSGetChatMsgReq + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CSGetChatMsgReq.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cs.CSGetChatMsgReq(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.page = reader.int32(); + break; + } + case 2: { + message.limit = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CSGetChatMsgReq message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cs.CSGetChatMsgReq + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cs.CSGetChatMsgReq} CSGetChatMsgReq + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CSGetChatMsgReq.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CSGetChatMsgReq message. + * @function verify + * @memberof cs.CSGetChatMsgReq + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CSGetChatMsgReq.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.page != null && message.hasOwnProperty("page")) + if (!$util.isInteger(message.page)) + return "page: integer expected"; + if (message.limit != null && message.hasOwnProperty("limit")) + if (!$util.isInteger(message.limit)) + return "limit: integer expected"; + return null; + }; + + /** + * Creates a CSGetChatMsgReq message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cs.CSGetChatMsgReq + * @static + * @param {Object.} object Plain object + * @returns {cs.CSGetChatMsgReq} CSGetChatMsgReq + */ + CSGetChatMsgReq.fromObject = function fromObject(object) { + if (object instanceof $root.cs.CSGetChatMsgReq) + return object; + var message = new $root.cs.CSGetChatMsgReq(); + if (object.page != null) + message.page = object.page | 0; + if (object.limit != null) + message.limit = object.limit | 0; + return message; + }; + + /** + * Creates a plain object from a CSGetChatMsgReq message. Also converts values to other types if specified. + * @function toObject + * @memberof cs.CSGetChatMsgReq + * @static + * @param {cs.CSGetChatMsgReq} message CSGetChatMsgReq + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CSGetChatMsgReq.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.page = 0; + object.limit = 0; + } + 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 CSGetChatMsgReq to JSON. + * @function toJSON + * @memberof cs.CSGetChatMsgReq + * @instance + * @returns {Object.} JSON object + */ + CSGetChatMsgReq.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CSGetChatMsgReq + * @function getTypeUrl + * @memberof cs.CSGetChatMsgReq + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CSGetChatMsgReq.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/cs.CSGetChatMsgReq"; + }; + + return CSGetChatMsgReq; + })(); + + cs.CSGetChatMsgRes = (function() { + + /** + * Properties of a CSGetChatMsgRes. + * @memberof cs + * @interface ICSGetChatMsgRes + * @property {Array.|null} [msgs] CSGetChatMsgRes msgs + */ + + /** + * Constructs a new CSGetChatMsgRes. + * @memberof cs + * @classdesc Represents a CSGetChatMsgRes. + * @implements ICSGetChatMsgRes + * @constructor + * @param {cs.ICSGetChatMsgRes=} [properties] Properties to set + */ + function CSGetChatMsgRes(properties) { + this.msgs = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CSGetChatMsgRes msgs. + * @member {Array.} msgs + * @memberof cs.CSGetChatMsgRes + * @instance + */ + CSGetChatMsgRes.prototype.msgs = $util.emptyArray; + + /** + * Creates a new CSGetChatMsgRes instance using the specified properties. + * @function create + * @memberof cs.CSGetChatMsgRes + * @static + * @param {cs.ICSGetChatMsgRes=} [properties] Properties to set + * @returns {cs.CSGetChatMsgRes} CSGetChatMsgRes instance + */ + CSGetChatMsgRes.create = function create(properties) { + return new CSGetChatMsgRes(properties); + }; + + /** + * Encodes the specified CSGetChatMsgRes message. Does not implicitly {@link cs.CSGetChatMsgRes.verify|verify} messages. + * @function encode + * @memberof cs.CSGetChatMsgRes + * @static + * @param {cs.ICSGetChatMsgRes} message CSGetChatMsgRes message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CSGetChatMsgRes.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.msgs != null && message.msgs.length) + for (var i = 0; i < message.msgs.length; ++i) + $root.cs.ChatMsg.encode(message.msgs[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CSGetChatMsgRes message, length delimited. Does not implicitly {@link cs.CSGetChatMsgRes.verify|verify} messages. + * @function encodeDelimited + * @memberof cs.CSGetChatMsgRes + * @static + * @param {cs.ICSGetChatMsgRes} message CSGetChatMsgRes message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CSGetChatMsgRes.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CSGetChatMsgRes message from the specified reader or buffer. + * @function decode + * @memberof cs.CSGetChatMsgRes + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cs.CSGetChatMsgRes} CSGetChatMsgRes + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CSGetChatMsgRes.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cs.CSGetChatMsgRes(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.msgs && message.msgs.length)) + message.msgs = []; + message.msgs.push($root.cs.ChatMsg.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CSGetChatMsgRes message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cs.CSGetChatMsgRes + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cs.CSGetChatMsgRes} CSGetChatMsgRes + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CSGetChatMsgRes.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CSGetChatMsgRes message. + * @function verify + * @memberof cs.CSGetChatMsgRes + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CSGetChatMsgRes.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.msgs != null && message.hasOwnProperty("msgs")) { + if (!Array.isArray(message.msgs)) + return "msgs: array expected"; + for (var i = 0; i < message.msgs.length; ++i) { + var error = $root.cs.ChatMsg.verify(message.msgs[i]); + if (error) + return "msgs." + error; + } + } + return null; + }; + + /** + * Creates a CSGetChatMsgRes message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cs.CSGetChatMsgRes + * @static + * @param {Object.} object Plain object + * @returns {cs.CSGetChatMsgRes} CSGetChatMsgRes + */ + CSGetChatMsgRes.fromObject = function fromObject(object) { + if (object instanceof $root.cs.CSGetChatMsgRes) + return object; + var message = new $root.cs.CSGetChatMsgRes(); + if (object.msgs) { + if (!Array.isArray(object.msgs)) + throw TypeError(".cs.CSGetChatMsgRes.msgs: array expected"); + message.msgs = []; + for (var i = 0; i < object.msgs.length; ++i) { + if (typeof object.msgs[i] !== "object") + throw TypeError(".cs.CSGetChatMsgRes.msgs: object expected"); + message.msgs[i] = $root.cs.ChatMsg.fromObject(object.msgs[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a CSGetChatMsgRes message. Also converts values to other types if specified. + * @function toObject + * @memberof cs.CSGetChatMsgRes + * @static + * @param {cs.CSGetChatMsgRes} message CSGetChatMsgRes + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CSGetChatMsgRes.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.msgs = []; + if (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 CSGetChatMsgRes to JSON. + * @function toJSON + * @memberof cs.CSGetChatMsgRes + * @instance + * @returns {Object.} JSON object + */ + CSGetChatMsgRes.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CSGetChatMsgRes + * @function getTypeUrl + * @memberof cs.CSGetChatMsgRes + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CSGetChatMsgRes.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/cs.CSGetChatMsgRes"; + }; + + return CSGetChatMsgRes; + })(); + cs.CSLoginReq = (function() { /** diff --git a/proto_cs b/proto_cs index 664c8ad7..f055100c 160000 --- a/proto_cs +++ b/proto_cs @@ -1 +1 @@ -Subproject commit 664c8ad737a91ffcbe862180fefd5a450777ce9a +Subproject commit f055100cf0f378ddd96d8e153655b5166c65e6e8