From 8b4f2d7262ae928faee6a5ccad57adf0ab216fba Mon Sep 17 00:00:00 2001 From: chen wei bo <1025839511@qq.com> Date: Wed, 8 Oct 2025 13:38:45 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8D=8F=E8=AE=AE=E4=BF=AE=E6=94=B9=EF=BC=9A?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E7=83=AD=E5=BA=A6=E5=80=BC=E5=92=8C=E6=94=B6?= =?UTF-8?q?=E8=97=8F=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/Scripts/chat18x/data/DataManager.ts | 1 + assets/Scripts/chat18x/data/GirlData.ts | 193 +- .../chat18x/data/GirlFavorabilityData.ts | 22 + assets/Scripts/chat18x/data/GirlOtherData.ts | 38 + .../chat18x/data/GirlOtherData.ts.meta | 9 + assets/Scripts/proto/proto.pb.d.ts | 808 ++++++++ assets/Scripts/proto/proto.pb.js | 1813 +++++++++++++++++ proto_cs | 2 +- 8 files changed, 2827 insertions(+), 59 deletions(-) create mode 100644 assets/Scripts/chat18x/data/GirlOtherData.ts create mode 100644 assets/Scripts/chat18x/data/GirlOtherData.ts.meta diff --git a/assets/Scripts/chat18x/data/DataManager.ts b/assets/Scripts/chat18x/data/DataManager.ts index 54bc07e4..f67df32c 100644 --- a/assets/Scripts/chat18x/data/DataManager.ts +++ b/assets/Scripts/chat18x/data/DataManager.ts @@ -37,6 +37,7 @@ export enum DataId { GirlUnlock = "girlUnlock", // 技师的解锁数据 GirlChat = "girlChat", // 技师的聊天数据 GirlFavorability = "girlFavorability", // 技师的好感度数据 + GirlOther = "girlOther", // 技师的其他数据 Env = "env", // 环境数据 Global = "global", // 全局数据 AiCharacter = "aiCharacter", // Ai角色配置 diff --git a/assets/Scripts/chat18x/data/GirlData.ts b/assets/Scripts/chat18x/data/GirlData.ts index a5e8bc64..dd473a88 100644 --- a/assets/Scripts/chat18x/data/GirlData.ts +++ b/assets/Scripts/chat18x/data/GirlData.ts @@ -7,6 +7,7 @@ import { GirlDetailData } from "./GirlDetailData"; import { GirlUnlockData } from "./GirlUnlockData"; import { GirlChatData } from "./GirlChatData"; import { GirlFavorabilityData } from "./GirlFavorabilityData"; +import { GirlOtherData } from "./GirlOtherData"; import { DataId } from "./DataManager"; import proto from "db://assets/Scripts/proto/proto.pb.js"; import { PriceType } from "../../schema/schema"; @@ -24,6 +25,8 @@ interface CategoryBucket { chats: Map; // 技师的好感度数据 favorability: Map; + // 技师的其他数据 + other: Map; // 技师的id girlIds: number[]; } @@ -67,6 +70,7 @@ export class GirlData extends BaseData { unlocks: new Map(), chats: new Map(), favorability: new Map(), + other: new Map(), girlIds: [], }; cats.set(categoryId, bucket); @@ -89,6 +93,7 @@ export class GirlData extends BaseData { this.setGirlBrief(categoryId, data.girls); this.setGirlUnlock(categoryId, data.girls); this.setGirlFavorability(categoryId, data.girls); + this.setGirlOther(categoryId, data.girls); const bucket = this.ensureBucket(categoryId); logger.log("保存类别 ", categoryId, " 的技师列表: ", bucket); @@ -107,6 +112,7 @@ export class GirlData extends BaseData { this.setGirlUnlock(categoryId, details); this.setGirlChat(categoryId, details); this.setGirlFavorability(categoryId, details); + this.setGirlOther(categoryId, details); const bucket = this.ensureBucket(categoryId); logger.log("保存类别 ", categoryId, " 的详细数据: ", bucket); @@ -129,6 +135,54 @@ export class GirlData extends BaseData { logger.log("保存可聊天的技师数据: ", cats); } + /** --------------------------------------------------------- 每日推荐 --------------------------------------------------------- */ + + /** 保存每日推荐:放入特殊分类 DAILY_BUCKET,并维护 id 索引 */ + public setDailyRecommend(data: proto.cs.ICSDailyRecommendRes): void { + if (!data) return; + this.mergeOneBrief(DAILY_BUCKET, data.girl); + const bucket = this.ensureBucket(DAILY_BUCKET); + logger.log("保存每日推荐: ", bucket); + } + + /** 判断每日推荐是否存在 */ + public isDailyRecommendIn(): boolean { + const bucket = this.ensureCategories().get(DAILY_BUCKET); + if (!bucket) return false; + return bucket.girlIds.length > 0; + } + + /** 获取推荐id */ + public getRecommendGirlId(): number { + const bucket = this.ensureBucket(DAILY_BUCKET); + const girlIds = bucket.girlIds; + const length = girlIds.length; + if (length <= 0) return 0; + return girlIds[length - 1]; + } + + /** 获取每日推荐的简要数据 */ + private getRecommendGrilBrief(): GirlBriefData | null { + const recId = this.getRecommendGirlId(); + if (recId <= 0) return null; + const data = this.getGrilBrief(DAILY_BUCKET, recId); + return data; + } + + /** 获取名字 */ + public getRecommendGrilName(): string { + let oneData = this.getRecommendGrilBrief(); + if (!oneData) return ""; + return oneData.getGrilName(); + } + + /** 获取头像路径 */ + public getRecommendGrilAvatar(): string { + let oneData = this.getRecommendGrilBrief(); + if (!oneData) return ""; + return oneData.getGrilAvatar(); + } + /** --------------------------------------------------------- 技师的简要数据 --------------------------------------------------------- */ /** @@ -1155,31 +1209,24 @@ export class GirlData extends BaseData { /** --------------------------------------------------------- 技师的好感度数据 --------------------------------------------------------- */ // 创建一个技师好感度数据 - private createOneGirlFavorability( - id: number, - star: number - ): GirlFavorabilityData { + private createOneGirlFavorability(id: number, star: number, bookmarkTime: number): GirlFavorabilityData { let oneData = new GirlFavorabilityData(); oneData.init?.(DataId.GirlFavorability); oneData.setId(id); oneData.setStar(star); + oneData.setBookmarkTime(bookmarkTime); return oneData; } // 解析技师好感度数据,一个 - private parseOneGirlFavorability( - data: proto.cs.IGirlData - ): GirlFavorabilityData | null { + private parseOneGirlFavorability(data: proto.cs.IGirlData): GirlFavorabilityData | null { if (!data) return null; - let oneData = this.createOneGirlFavorability(data.id, data.star); + let oneData = this.createOneGirlFavorability(data.id, data.star, Number(data.bookmarkTime)); return oneData; } /** 保存技师的好感度数据 */ - private setGirlFavorability( - categoryId: string, - data: proto.cs.IGirlData[] - ): void { + private setGirlFavorability(categoryId: string,data: proto.cs.IGirlData[]): void { if (!data) return; const bucket = this.ensureBucket(categoryId); for (const g of data) { @@ -1195,14 +1242,14 @@ export class GirlData extends BaseData { let briefData = data.girl; let categoryId = briefData.category; let girlId = briefData.id; - let favData = this.getGrilFavorability(categoryId.toString(), girlId); + let favData = this.getGirlFavorability(categoryId.toString(), girlId); if (favData) { // 已存在数据,刷新 favData.setStar(data.star); } else { // 不存在数据,创建 const bucket = this.ensureBucket(categoryId.toString()); - let oneData = this.createOneGirlFavorability(data.id, data.star); + let oneData = this.createOneGirlFavorability(data.id, data.star, 0); if (oneData) { bucket.favorability.set(data.id, oneData); } @@ -1210,10 +1257,7 @@ export class GirlData extends BaseData { } /** 取某分类 + girlId 的好感度数据 */ - private getGrilFavorability( - categoryId: string, - girlId: number - ): GirlFavorabilityData | null { + private getGirlFavorability(categoryId: string, girlId: number): GirlFavorabilityData | null { const b = this.ensureCategories().get(categoryId); if (!b) return null; return b.favorability.get(girlId) ?? null; @@ -1228,56 +1272,89 @@ export class GirlData extends BaseData { /** 获取星级 */ public getStar(categoryId: string, girlId: number): number { - let oneData = this.getGrilFavorability(categoryId, girlId); + let oneData = this.getGirlFavorability(categoryId, girlId); if (!oneData) return 0; return oneData.getStar(); } - /** --------------------------------------------------------- 每日推荐 --------------------------------------------------------- */ + /** 获取收藏时间,时间戳,秒 */ + public getBookmarkTime(categoryId: string, girlId: number): number { + let oneData = this.getGirlFavorability(categoryId, girlId); + if (!oneData) return 0; + return oneData.getBookmarkTime(); + } - /** 保存每日推荐:放入特殊分类 DAILY_BUCKET,并维护 id 索引 */ - public setDailyRecommend(data: proto.cs.ICSDailyRecommendRes): void { + /** 是否已经收藏 */ + public isBookmarkGirl(categoryId: string, girlId: number): boolean { + let oneData = this.getGirlFavorability(categoryId, girlId); + if (!oneData) return false; + return oneData.isBookmarkGirl(); + } + + /** 获取所有已经收藏技师的 id */ + public getAllBookmarkGirlIds(): number[] { + const result: number[] = []; + const seen = new Set(); // 用来去重 + const cats = this.ensureCategories(); + // 遍历 + for (const [categoryId, bucket] of cats.entries()) { + for (const girlId of bucket.girlIds) { + if (this.isBookmarkGirl(categoryId, girlId) && !seen.has(girlId)) { + seen.add(girlId); // 标记已加入 + result.push(girlId); + } + } + } + // 返回结果 + return result; + } + + /** --------------------------------------------------------- 技师的其他数据 --------------------------------------------------------- */ + + // 创建一个技师其他数据 + private createOneGirlOther(heatValue: number): GirlOtherData { + let oneData = new GirlOtherData(); + oneData.init?.(DataId.GirlOther); + oneData.setHeatValue(heatValue); + return oneData; + } + + // 解析技师其他数据,一个 + private parseOneGirlOther(data: proto.cs.IGirlData): GirlOtherData | null { + if (!data) return null; + let oneData = this.createOneGirlOther(Number(data.score)); + return oneData; + } + + /** 保存技师的其他数据 */ + private setGirlOther(categoryId: string, data: proto.cs.IGirlData[]): void { if (!data) return; - this.mergeOneBrief(DAILY_BUCKET, data.girl); - const bucket = this.ensureBucket(DAILY_BUCKET); - logger.log("保存每日推荐: ", bucket); + const bucket = this.ensureBucket(categoryId); + for (const g of data) { + const one = this.parseOneGirlOther(g); + if (!one) continue; + bucket.other.set(g.id, one); + } } - /** 判断每日推荐是否存在 */ - public isDailyRecommendIn(): boolean { - const bucket = this.ensureCategories().get(DAILY_BUCKET); - if (!bucket) return false; - return bucket.girlIds.length > 0; + /** 取某分类 + girlId 的其他数据 */ + private getGirlOther(categoryId: string, girlId: number): GirlOtherData | null { + const b = this.ensureCategories().get(categoryId); + if (!b) return null; + return b.other.get(girlId) ?? null; } - /** 获取推荐id */ - public getRecommendGirlId(): number { - const bucket = this.ensureBucket(DAILY_BUCKET); - const girlIds = bucket.girlIds; - const length = girlIds.length; - if (length <= 0) return 0; - return girlIds[length - 1]; - } + /** 技师的其他数据是否存在 */ + public isGirlOtherIn(categoryId: string, girlId: number): boolean { + const b = this.ensureCategories().get(categoryId); + if (!b) return false; + return b.other.has(girlId); + } - /** 获取每日推荐的简要数据 */ - private getRecommendGrilBrief(): GirlBriefData | null { - const recId = this.getRecommendGirlId(); - if (recId <= 0) return null; - const data = this.getGrilBrief(DAILY_BUCKET, recId); - return data; - } - - /** 获取名字 */ - public getRecommendGrilName(): string { - let oneData = this.getRecommendGrilBrief(); - if (!oneData) return ""; - return oneData.getGrilName(); - } - - /** 获取头像路径 */ - public getRecommendGrilAvatar(): string { - let oneData = this.getRecommendGrilBrief(); - if (!oneData) return ""; - return oneData.getGrilAvatar(); + /** 获取热度值 */ + public getHeatValue(categoryId: string, girlId: number): number { + let oneData = this.getGirlOther(categoryId, girlId); + if (!oneData) return 0; + return oneData.getHeatValue(); } } diff --git a/assets/Scripts/chat18x/data/GirlFavorabilityData.ts b/assets/Scripts/chat18x/data/GirlFavorabilityData.ts index 3a8efbfd..9db88eb5 100644 --- a/assets/Scripts/chat18x/data/GirlFavorabilityData.ts +++ b/assets/Scripts/chat18x/data/GirlFavorabilityData.ts @@ -9,27 +9,33 @@ export class GirlFavorabilityData extends BaseData { private id: number; // 星级 private star: number; + // 收藏时间,时间戳,秒,0: 表示还没收藏 + private bookmarkTime: number; constructor() { super(); this.id = 0; this.star = 0; + this.bookmarkTime = 0; } public reset(): void { this.id = 0; this.star = 0; + this.bookmarkTime = 0; } public clear(): void { this.id = 0; this.star = 0; + this.bookmarkTime = 0; } public destroy(): void { super.destroy(); this.id = null; this.star = null; + this.bookmarkTime = null; } /** 获取 id */ @@ -51,4 +57,20 @@ export class GirlFavorabilityData extends BaseData { public setStar(value: number): void { this.star = value; } + + /** 获取 收藏时间,时间戳,秒 */ + public getBookmarkTime(): number { + return this.bookmarkTime; + } + + /** 保存 收藏时间,时间戳,秒 */ + public setBookmarkTime(value: number): void { + this.bookmarkTime = value; + // logger.log("设置角色 ", this.id, " 的收藏时间:", this.bookmarkTime); + } + + /** 是否已经收藏 */ + public isBookmarkGirl(): boolean { + return this.bookmarkTime !== 0; + } } diff --git a/assets/Scripts/chat18x/data/GirlOtherData.ts b/assets/Scripts/chat18x/data/GirlOtherData.ts new file mode 100644 index 00000000..aadf5413 --- /dev/null +++ b/assets/Scripts/chat18x/data/GirlOtherData.ts @@ -0,0 +1,38 @@ +/** + * 技师的其他数据 + */ +import { BaseData } from "./BaseData"; +import proto from 'db://assets/Scripts/proto/proto.pb.js'; + +export class GirlOtherData extends BaseData { + // 热度值 + private heatValue: number; + + constructor() { + super(); + this.heatValue = 0; + } + + public reset(): void { + this.heatValue = 0; + } + + public clear(): void { + this.heatValue = 0; + } + + public destroy(): void { + super.destroy(); + this.heatValue = null; + } + + /** 获取 热度值 */ + public getHeatValue(): number { + return this.heatValue; + } + + /** 保存 热度值 */ + public setHeatValue(value: number): void { + this.heatValue = value; + } +} diff --git a/assets/Scripts/chat18x/data/GirlOtherData.ts.meta b/assets/Scripts/chat18x/data/GirlOtherData.ts.meta new file mode 100644 index 00000000..bd652239 --- /dev/null +++ b/assets/Scripts/chat18x/data/GirlOtherData.ts.meta @@ -0,0 +1,9 @@ +{ + "ver": "4.0.24", + "importer": "typescript", + "imported": true, + "uuid": "f3741d24-8c36-4f2c-825e-31097c50d628", + "files": [], + "subMetas": {}, + "userData": {} +} diff --git a/assets/Scripts/proto/proto.pb.d.ts b/assets/Scripts/proto/proto.pb.d.ts index dc6c7db6..dc4168c5 100644 --- a/assets/Scripts/proto/proto.pb.d.ts +++ b/assets/Scripts/proto/proto.pb.d.ts @@ -503,6 +503,12 @@ static getTypeUrl(typeUrlPrefix?: string): string; /** GirlData unlockTime */ unlockTime?: (number|Long|null); + /** GirlData score */ + score?: (number|Long|null); + + /** GirlData bookmarkTime */ + bookmarkTime?: (number|Long|null); + /** GirlData detail */ detail?: (cs.IGirlsDetail|null); @@ -543,6 +549,12 @@ star: number; /** GirlData unlockTime. */ unlockTime: (number|Long); + /** GirlData score. */ +score: (number|Long); + + /** GirlData bookmarkTime. */ +bookmarkTime: (number|Long); + /** GirlData detail. */ detail?: (cs.IGirlsDetail|null); @@ -3595,6 +3607,802 @@ toJSON(): { [k: string]: any }; static getTypeUrl(typeUrlPrefix?: string): string; } + /** EnmRankType enum. */ + enum EnmRankType { + ERT_Day = 0, + ERT_Week = 1, + ERT_Month = 2, + ERT_Total = 3 + } + + /** Properties of a CSGetRankReq. */ + interface ICSGetRankReq { + + /** CSGetRankReq rankType */ + rankType?: (number|null); + + /** CSGetRankReq page */ + page?: (number|null); + + /** CSGetRankReq limit */ + limit?: (number|null); + } + + /** Represents a CSGetRankReq. */ + class CSGetRankReq implements ICSGetRankReq { + + /** + * Constructs a new CSGetRankReq. + * @param [properties] Properties to set + */ + constructor(properties?: cs.ICSGetRankReq); + + /** CSGetRankReq rankType. */ +rankType: number; + + /** CSGetRankReq page. */ +page: number; + + /** CSGetRankReq limit. */ +limit: number; + + /** + * Creates a new CSGetRankReq instance using the specified properties. + * @param [properties] Properties to set + * @returns CSGetRankReq instance + */ +static create(properties?: cs.ICSGetRankReq): cs.CSGetRankReq; + + /** + * Encodes the specified CSGetRankReq message. Does not implicitly {@link cs.CSGetRankReq.verify|verify} messages. + * @param message CSGetRankReq message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ +static encode(message: cs.ICSGetRankReq, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CSGetRankReq message, length delimited. Does not implicitly {@link cs.CSGetRankReq.verify|verify} messages. + * @param message CSGetRankReq message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ +static encodeDelimited(message: cs.ICSGetRankReq, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CSGetRankReq message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CSGetRankReq + * @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.CSGetRankReq; + + /** + * Decodes a CSGetRankReq message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CSGetRankReq + * @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.CSGetRankReq; + + /** + * Verifies a CSGetRankReq 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 CSGetRankReq message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CSGetRankReq + */ +static fromObject(object: { [k: string]: any }): cs.CSGetRankReq; + + /** + * Creates a plain object from a CSGetRankReq message. Also converts values to other types if specified. + * @param message CSGetRankReq + * @param [options] Conversion options + * @returns Plain object + */ +static toObject(message: cs.CSGetRankReq, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CSGetRankReq to JSON. + * @returns JSON object + */ +toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CSGetRankReq + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ +static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CSGetRankRes. */ + interface ICSGetRankRes { + + /** CSGetRankRes girls */ + girls?: (cs.IGirlData[]|null); + } + + /** Represents a CSGetRankRes. */ + class CSGetRankRes implements ICSGetRankRes { + + /** + * Constructs a new CSGetRankRes. + * @param [properties] Properties to set + */ + constructor(properties?: cs.ICSGetRankRes); + + /** CSGetRankRes girls. */ +girls: cs.IGirlData[]; + + /** + * Creates a new CSGetRankRes instance using the specified properties. + * @param [properties] Properties to set + * @returns CSGetRankRes instance + */ +static create(properties?: cs.ICSGetRankRes): cs.CSGetRankRes; + + /** + * Encodes the specified CSGetRankRes message. Does not implicitly {@link cs.CSGetRankRes.verify|verify} messages. + * @param message CSGetRankRes message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ +static encode(message: cs.ICSGetRankRes, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CSGetRankRes message, length delimited. Does not implicitly {@link cs.CSGetRankRes.verify|verify} messages. + * @param message CSGetRankRes message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ +static encodeDelimited(message: cs.ICSGetRankRes, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CSGetRankRes message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CSGetRankRes + * @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.CSGetRankRes; + + /** + * Decodes a CSGetRankRes message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CSGetRankRes + * @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.CSGetRankRes; + + /** + * Verifies a CSGetRankRes 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 CSGetRankRes message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CSGetRankRes + */ +static fromObject(object: { [k: string]: any }): cs.CSGetRankRes; + + /** + * Creates a plain object from a CSGetRankRes message. Also converts values to other types if specified. + * @param message CSGetRankRes + * @param [options] Conversion options + * @returns Plain object + */ +static toObject(message: cs.CSGetRankRes, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CSGetRankRes to JSON. + * @returns JSON object + */ +toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CSGetRankRes + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ +static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CSViewGirlReq. */ + interface ICSViewGirlReq { + + /** CSViewGirlReq girlId */ + girlId?: (number|null); + } + + /** Represents a CSViewGirlReq. */ + class CSViewGirlReq implements ICSViewGirlReq { + + /** + * Constructs a new CSViewGirlReq. + * @param [properties] Properties to set + */ + constructor(properties?: cs.ICSViewGirlReq); + + /** CSViewGirlReq girlId. */ +girlId: number; + + /** + * Creates a new CSViewGirlReq instance using the specified properties. + * @param [properties] Properties to set + * @returns CSViewGirlReq instance + */ +static create(properties?: cs.ICSViewGirlReq): cs.CSViewGirlReq; + + /** + * Encodes the specified CSViewGirlReq message. Does not implicitly {@link cs.CSViewGirlReq.verify|verify} messages. + * @param message CSViewGirlReq message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ +static encode(message: cs.ICSViewGirlReq, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CSViewGirlReq message, length delimited. Does not implicitly {@link cs.CSViewGirlReq.verify|verify} messages. + * @param message CSViewGirlReq message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ +static encodeDelimited(message: cs.ICSViewGirlReq, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CSViewGirlReq message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CSViewGirlReq + * @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.CSViewGirlReq; + + /** + * Decodes a CSViewGirlReq message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CSViewGirlReq + * @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.CSViewGirlReq; + + /** + * Verifies a CSViewGirlReq 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 CSViewGirlReq message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CSViewGirlReq + */ +static fromObject(object: { [k: string]: any }): cs.CSViewGirlReq; + + /** + * Creates a plain object from a CSViewGirlReq message. Also converts values to other types if specified. + * @param message CSViewGirlReq + * @param [options] Conversion options + * @returns Plain object + */ +static toObject(message: cs.CSViewGirlReq, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CSViewGirlReq to JSON. + * @returns JSON object + */ +toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CSViewGirlReq + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ +static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CSViewGirlRes. */ + interface ICSViewGirlRes { + } + + /** Represents a CSViewGirlRes. */ + class CSViewGirlRes implements ICSViewGirlRes { + + /** + * Constructs a new CSViewGirlRes. + * @param [properties] Properties to set + */ + constructor(properties?: cs.ICSViewGirlRes); + + /** + * Creates a new CSViewGirlRes instance using the specified properties. + * @param [properties] Properties to set + * @returns CSViewGirlRes instance + */ +static create(properties?: cs.ICSViewGirlRes): cs.CSViewGirlRes; + + /** + * Encodes the specified CSViewGirlRes message. Does not implicitly {@link cs.CSViewGirlRes.verify|verify} messages. + * @param message CSViewGirlRes message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ +static encode(message: cs.ICSViewGirlRes, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CSViewGirlRes message, length delimited. Does not implicitly {@link cs.CSViewGirlRes.verify|verify} messages. + * @param message CSViewGirlRes message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ +static encodeDelimited(message: cs.ICSViewGirlRes, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CSViewGirlRes message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CSViewGirlRes + * @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.CSViewGirlRes; + + /** + * Decodes a CSViewGirlRes message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CSViewGirlRes + * @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.CSViewGirlRes; + + /** + * Verifies a CSViewGirlRes 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 CSViewGirlRes message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CSViewGirlRes + */ +static fromObject(object: { [k: string]: any }): cs.CSViewGirlRes; + + /** + * Creates a plain object from a CSViewGirlRes message. Also converts values to other types if specified. + * @param message CSViewGirlRes + * @param [options] Conversion options + * @returns Plain object + */ +static toObject(message: cs.CSViewGirlRes, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CSViewGirlRes to JSON. + * @returns JSON object + */ +toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CSViewGirlRes + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ +static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CSBookmarkReq. */ + interface ICSBookmarkReq { + + /** CSBookmarkReq girlId */ + girlId?: (number|null); + + /** CSBookmarkReq cancel */ + cancel?: (boolean|null); + } + + /** Represents a CSBookmarkReq. */ + class CSBookmarkReq implements ICSBookmarkReq { + + /** + * Constructs a new CSBookmarkReq. + * @param [properties] Properties to set + */ + constructor(properties?: cs.ICSBookmarkReq); + + /** CSBookmarkReq girlId. */ +girlId: number; + + /** CSBookmarkReq cancel. */ +cancel: boolean; + + /** + * Creates a new CSBookmarkReq instance using the specified properties. + * @param [properties] Properties to set + * @returns CSBookmarkReq instance + */ +static create(properties?: cs.ICSBookmarkReq): cs.CSBookmarkReq; + + /** + * Encodes the specified CSBookmarkReq message. Does not implicitly {@link cs.CSBookmarkReq.verify|verify} messages. + * @param message CSBookmarkReq message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ +static encode(message: cs.ICSBookmarkReq, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CSBookmarkReq message, length delimited. Does not implicitly {@link cs.CSBookmarkReq.verify|verify} messages. + * @param message CSBookmarkReq message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ +static encodeDelimited(message: cs.ICSBookmarkReq, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CSBookmarkReq message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CSBookmarkReq + * @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.CSBookmarkReq; + + /** + * Decodes a CSBookmarkReq message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CSBookmarkReq + * @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.CSBookmarkReq; + + /** + * Verifies a CSBookmarkReq 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 CSBookmarkReq message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CSBookmarkReq + */ +static fromObject(object: { [k: string]: any }): cs.CSBookmarkReq; + + /** + * Creates a plain object from a CSBookmarkReq message. Also converts values to other types if specified. + * @param message CSBookmarkReq + * @param [options] Conversion options + * @returns Plain object + */ +static toObject(message: cs.CSBookmarkReq, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CSBookmarkReq to JSON. + * @returns JSON object + */ +toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CSBookmarkReq + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ +static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CSBookmarkRes. */ + interface ICSBookmarkRes { + } + + /** Represents a CSBookmarkRes. */ + class CSBookmarkRes implements ICSBookmarkRes { + + /** + * Constructs a new CSBookmarkRes. + * @param [properties] Properties to set + */ + constructor(properties?: cs.ICSBookmarkRes); + + /** + * Creates a new CSBookmarkRes instance using the specified properties. + * @param [properties] Properties to set + * @returns CSBookmarkRes instance + */ +static create(properties?: cs.ICSBookmarkRes): cs.CSBookmarkRes; + + /** + * Encodes the specified CSBookmarkRes message. Does not implicitly {@link cs.CSBookmarkRes.verify|verify} messages. + * @param message CSBookmarkRes message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ +static encode(message: cs.ICSBookmarkRes, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CSBookmarkRes message, length delimited. Does not implicitly {@link cs.CSBookmarkRes.verify|verify} messages. + * @param message CSBookmarkRes message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ +static encodeDelimited(message: cs.ICSBookmarkRes, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CSBookmarkRes message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CSBookmarkRes + * @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.CSBookmarkRes; + + /** + * Decodes a CSBookmarkRes message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CSBookmarkRes + * @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.CSBookmarkRes; + + /** + * Verifies a CSBookmarkRes 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 CSBookmarkRes message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CSBookmarkRes + */ +static fromObject(object: { [k: string]: any }): cs.CSBookmarkRes; + + /** + * Creates a plain object from a CSBookmarkRes message. Also converts values to other types if specified. + * @param message CSBookmarkRes + * @param [options] Conversion options + * @returns Plain object + */ +static toObject(message: cs.CSBookmarkRes, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CSBookmarkRes to JSON. + * @returns JSON object + */ +toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CSBookmarkRes + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ +static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CSGetBookmarkReq. */ + interface ICSGetBookmarkReq { + + /** CSGetBookmarkReq page */ + page?: (number|null); + + /** CSGetBookmarkReq limit */ + limit?: (number|null); + } + + /** Represents a CSGetBookmarkReq. */ + class CSGetBookmarkReq implements ICSGetBookmarkReq { + + /** + * Constructs a new CSGetBookmarkReq. + * @param [properties] Properties to set + */ + constructor(properties?: cs.ICSGetBookmarkReq); + + /** CSGetBookmarkReq page. */ +page: number; + + /** CSGetBookmarkReq limit. */ +limit: number; + + /** + * Creates a new CSGetBookmarkReq instance using the specified properties. + * @param [properties] Properties to set + * @returns CSGetBookmarkReq instance + */ +static create(properties?: cs.ICSGetBookmarkReq): cs.CSGetBookmarkReq; + + /** + * Encodes the specified CSGetBookmarkReq message. Does not implicitly {@link cs.CSGetBookmarkReq.verify|verify} messages. + * @param message CSGetBookmarkReq message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ +static encode(message: cs.ICSGetBookmarkReq, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CSGetBookmarkReq message, length delimited. Does not implicitly {@link cs.CSGetBookmarkReq.verify|verify} messages. + * @param message CSGetBookmarkReq message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ +static encodeDelimited(message: cs.ICSGetBookmarkReq, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CSGetBookmarkReq message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CSGetBookmarkReq + * @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.CSGetBookmarkReq; + + /** + * Decodes a CSGetBookmarkReq message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CSGetBookmarkReq + * @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.CSGetBookmarkReq; + + /** + * Verifies a CSGetBookmarkReq 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 CSGetBookmarkReq message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CSGetBookmarkReq + */ +static fromObject(object: { [k: string]: any }): cs.CSGetBookmarkReq; + + /** + * Creates a plain object from a CSGetBookmarkReq message. Also converts values to other types if specified. + * @param message CSGetBookmarkReq + * @param [options] Conversion options + * @returns Plain object + */ +static toObject(message: cs.CSGetBookmarkReq, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CSGetBookmarkReq to JSON. + * @returns JSON object + */ +toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CSGetBookmarkReq + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ +static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CSGetBookmarkRes. */ + interface ICSGetBookmarkRes { + + /** CSGetBookmarkRes girls */ + girls?: (cs.IGirlData[]|null); + } + + /** Represents a CSGetBookmarkRes. */ + class CSGetBookmarkRes implements ICSGetBookmarkRes { + + /** + * Constructs a new CSGetBookmarkRes. + * @param [properties] Properties to set + */ + constructor(properties?: cs.ICSGetBookmarkRes); + + /** CSGetBookmarkRes girls. */ +girls: cs.IGirlData[]; + + /** + * Creates a new CSGetBookmarkRes instance using the specified properties. + * @param [properties] Properties to set + * @returns CSGetBookmarkRes instance + */ +static create(properties?: cs.ICSGetBookmarkRes): cs.CSGetBookmarkRes; + + /** + * Encodes the specified CSGetBookmarkRes message. Does not implicitly {@link cs.CSGetBookmarkRes.verify|verify} messages. + * @param message CSGetBookmarkRes message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ +static encode(message: cs.ICSGetBookmarkRes, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CSGetBookmarkRes message, length delimited. Does not implicitly {@link cs.CSGetBookmarkRes.verify|verify} messages. + * @param message CSGetBookmarkRes message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ +static encodeDelimited(message: cs.ICSGetBookmarkRes, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CSGetBookmarkRes message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CSGetBookmarkRes + * @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.CSGetBookmarkRes; + + /** + * Decodes a CSGetBookmarkRes message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CSGetBookmarkRes + * @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.CSGetBookmarkRes; + + /** + * Verifies a CSGetBookmarkRes 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 CSGetBookmarkRes message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CSGetBookmarkRes + */ +static fromObject(object: { [k: string]: any }): cs.CSGetBookmarkRes; + + /** + * Creates a plain object from a CSGetBookmarkRes message. Also converts values to other types if specified. + * @param message CSGetBookmarkRes + * @param [options] Conversion options + * @returns Plain object + */ +static toObject(message: cs.CSGetBookmarkRes, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CSGetBookmarkRes to JSON. + * @returns JSON object + */ +toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CSGetBookmarkRes + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ +static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Category enum. */ enum Category { Category_mature = 0, diff --git a/assets/Scripts/proto/proto.pb.js b/assets/Scripts/proto/proto.pb.js index f3561214..cde857c2 100644 --- a/assets/Scripts/proto/proto.pb.js +++ b/assets/Scripts/proto/proto.pb.js @@ -1048,6 +1048,8 @@ $root.cs = (function() { * @property {boolean|null} [isRelease] GirlData isRelease * @property {number|null} [star] GirlData star * @property {number|Long|null} [unlockTime] GirlData unlockTime + * @property {number|Long|null} [score] GirlData score + * @property {number|Long|null} [bookmarkTime] GirlData bookmarkTime * @property {cs.IGirlsDetail|null} [detail] GirlData detail * @property {Array.|null} [images] GirlData images * @property {Array.|null} [videos] GirlData videos @@ -1112,6 +1114,22 @@ $root.cs = (function() { */ GirlData.prototype.unlockTime = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + /** + * GirlData score. + * @member {number|Long} score + * @memberof cs.GirlData + * @instance + */ + GirlData.prototype.score = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * GirlData bookmarkTime. + * @member {number|Long} bookmarkTime + * @memberof cs.GirlData + * @instance + */ + GirlData.prototype.bookmarkTime = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + /** * GirlData detail. * @member {cs.IGirlsDetail|null|undefined} detail @@ -1186,6 +1204,10 @@ $root.cs = (function() { writer.uint32(/* id 4, wireType 0 =*/32).int32(message.star); if (message.unlockTime != null && Object.hasOwnProperty.call(message, "unlockTime")) writer.uint32(/* id 5, wireType 0 =*/40).int64(message.unlockTime); + if (message.score != null && Object.hasOwnProperty.call(message, "score")) + writer.uint32(/* id 6, wireType 0 =*/48).int64(message.score); + if (message.bookmarkTime != null && Object.hasOwnProperty.call(message, "bookmarkTime")) + writer.uint32(/* id 7, wireType 0 =*/56).int64(message.bookmarkTime); if (message.detail != null && Object.hasOwnProperty.call(message, "detail")) $root.cs.GirlsDetail.encode(message.detail, writer.uint32(/* id 30, wireType 2 =*/242).fork()).ldelim(); if (message.images != null && message.images.length) @@ -1254,6 +1276,14 @@ $root.cs = (function() { message.unlockTime = reader.int64(); break; } + case 6: { + message.score = reader.int64(); + break; + } + case 7: { + message.bookmarkTime = reader.int64(); + break; + } case 30: { message.detail = $root.cs.GirlsDetail.decode(reader, reader.uint32()); break; @@ -1330,6 +1360,12 @@ $root.cs = (function() { if (message.unlockTime != null && message.hasOwnProperty("unlockTime")) if (!$util.isInteger(message.unlockTime) && !(message.unlockTime && $util.isInteger(message.unlockTime.low) && $util.isInteger(message.unlockTime.high))) return "unlockTime: integer|Long expected"; + if (message.score != null && message.hasOwnProperty("score")) + if (!$util.isInteger(message.score) && !(message.score && $util.isInteger(message.score.low) && $util.isInteger(message.score.high))) + return "score: integer|Long expected"; + if (message.bookmarkTime != null && message.hasOwnProperty("bookmarkTime")) + if (!$util.isInteger(message.bookmarkTime) && !(message.bookmarkTime && $util.isInteger(message.bookmarkTime.low) && $util.isInteger(message.bookmarkTime.high))) + return "bookmarkTime: integer|Long expected"; if (message.detail != null && message.hasOwnProperty("detail")) { var error = $root.cs.GirlsDetail.verify(message.detail); if (error) @@ -1394,6 +1430,24 @@ $root.cs = (function() { message.unlockTime = object.unlockTime; else if (typeof object.unlockTime === "object") message.unlockTime = new $util.LongBits(object.unlockTime.low >>> 0, object.unlockTime.high >>> 0).toNumber(); + if (object.score != null) + if ($util.Long) + (message.score = $util.Long.fromValue(object.score)).unsigned = false; + else if (typeof object.score === "string") + message.score = parseInt(object.score, 10); + else if (typeof object.score === "number") + message.score = object.score; + else if (typeof object.score === "object") + message.score = new $util.LongBits(object.score.low >>> 0, object.score.high >>> 0).toNumber(); + if (object.bookmarkTime != null) + if ($util.Long) + (message.bookmarkTime = $util.Long.fromValue(object.bookmarkTime)).unsigned = false; + else if (typeof object.bookmarkTime === "string") + message.bookmarkTime = parseInt(object.bookmarkTime, 10); + else if (typeof object.bookmarkTime === "number") + message.bookmarkTime = object.bookmarkTime; + else if (typeof object.bookmarkTime === "object") + message.bookmarkTime = new $util.LongBits(object.bookmarkTime.low >>> 0, object.bookmarkTime.high >>> 0).toNumber(); if (object.detail != null) { if (typeof object.detail !== "object") throw TypeError(".cs.GirlData.detail: object expected"); @@ -1453,6 +1507,16 @@ $root.cs = (function() { object.unlockTime = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; } else object.unlockTime = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.score = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.score = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.bookmarkTime = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.bookmarkTime = options.longs === String ? "0" : 0; object.detail = null; object.chatTotalCount = 0; object.chatRemainCount = 0; @@ -1470,6 +1534,16 @@ $root.cs = (function() { object.unlockTime = options.longs === String ? String(message.unlockTime) : message.unlockTime; else object.unlockTime = options.longs === String ? $util.Long.prototype.toString.call(message.unlockTime) : options.longs === Number ? new $util.LongBits(message.unlockTime.low >>> 0, message.unlockTime.high >>> 0).toNumber() : message.unlockTime; + if (message.score != null && message.hasOwnProperty("score")) + if (typeof message.score === "number") + object.score = options.longs === String ? String(message.score) : message.score; + else + object.score = options.longs === String ? $util.Long.prototype.toString.call(message.score) : options.longs === Number ? new $util.LongBits(message.score.low >>> 0, message.score.high >>> 0).toNumber() : message.score; + if (message.bookmarkTime != null && message.hasOwnProperty("bookmarkTime")) + if (typeof message.bookmarkTime === "number") + object.bookmarkTime = options.longs === String ? String(message.bookmarkTime) : message.bookmarkTime; + else + object.bookmarkTime = options.longs === String ? $util.Long.prototype.toString.call(message.bookmarkTime) : options.longs === Number ? new $util.LongBits(message.bookmarkTime.low >>> 0, message.bookmarkTime.high >>> 0).toNumber() : message.bookmarkTime; if (message.detail != null && message.hasOwnProperty("detail")) object.detail = $root.cs.GirlsDetail.toObject(message.detail, options); if (message.images && message.images.length) { @@ -8447,6 +8521,1745 @@ $root.cs = (function() { return CSGetLastChatListRes; })(); + /** + * EnmRankType enum. + * @name cs.EnmRankType + * @enum {number} + * @property {number} ERT_Day=0 ERT_Day value + * @property {number} ERT_Week=1 ERT_Week value + * @property {number} ERT_Month=2 ERT_Month value + * @property {number} ERT_Total=3 ERT_Total value + */ + cs.EnmRankType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ERT_Day"] = 0; + values[valuesById[1] = "ERT_Week"] = 1; + values[valuesById[2] = "ERT_Month"] = 2; + values[valuesById[3] = "ERT_Total"] = 3; + return values; + })(); + + cs.CSGetRankReq = (function() { + + /** + * Properties of a CSGetRankReq. + * @memberof cs + * @interface ICSGetRankReq + * @property {number|null} [rankType] CSGetRankReq rankType + * @property {number|null} [page] CSGetRankReq page + * @property {number|null} [limit] CSGetRankReq limit + */ + + /** + * Constructs a new CSGetRankReq. + * @memberof cs + * @classdesc Represents a CSGetRankReq. + * @implements ICSGetRankReq + * @constructor + * @param {cs.ICSGetRankReq=} [properties] Properties to set + */ + function CSGetRankReq(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]]; + } + + /** + * CSGetRankReq rankType. + * @member {number} rankType + * @memberof cs.CSGetRankReq + * @instance + */ + CSGetRankReq.prototype.rankType = 0; + + /** + * CSGetRankReq page. + * @member {number} page + * @memberof cs.CSGetRankReq + * @instance + */ + CSGetRankReq.prototype.page = 0; + + /** + * CSGetRankReq limit. + * @member {number} limit + * @memberof cs.CSGetRankReq + * @instance + */ + CSGetRankReq.prototype.limit = 0; + + /** + * Creates a new CSGetRankReq instance using the specified properties. + * @function create + * @memberof cs.CSGetRankReq + * @static + * @param {cs.ICSGetRankReq=} [properties] Properties to set + * @returns {cs.CSGetRankReq} CSGetRankReq instance + */ + CSGetRankReq.create = function create(properties) { + return new CSGetRankReq(properties); + }; + + /** + * Encodes the specified CSGetRankReq message. Does not implicitly {@link cs.CSGetRankReq.verify|verify} messages. + * @function encode + * @memberof cs.CSGetRankReq + * @static + * @param {cs.ICSGetRankReq} message CSGetRankReq message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CSGetRankReq.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rankType != null && Object.hasOwnProperty.call(message, "rankType")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.rankType); + if (message.page != null && Object.hasOwnProperty.call(message, "page")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.page); + if (message.limit != null && Object.hasOwnProperty.call(message, "limit")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.limit); + return writer; + }; + + /** + * Encodes the specified CSGetRankReq message, length delimited. Does not implicitly {@link cs.CSGetRankReq.verify|verify} messages. + * @function encodeDelimited + * @memberof cs.CSGetRankReq + * @static + * @param {cs.ICSGetRankReq} message CSGetRankReq message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CSGetRankReq.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CSGetRankReq message from the specified reader or buffer. + * @function decode + * @memberof cs.CSGetRankReq + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cs.CSGetRankReq} CSGetRankReq + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CSGetRankReq.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.CSGetRankReq(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.rankType = reader.int32(); + break; + } + case 2: { + message.page = reader.int32(); + break; + } + case 3: { + message.limit = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CSGetRankReq message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cs.CSGetRankReq + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cs.CSGetRankReq} CSGetRankReq + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CSGetRankReq.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CSGetRankReq message. + * @function verify + * @memberof cs.CSGetRankReq + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CSGetRankReq.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.rankType != null && message.hasOwnProperty("rankType")) + if (!$util.isInteger(message.rankType)) + return "rankType: integer expected"; + if (message.page != null && message.hasOwnProperty("page")) + if (!$util.isInteger(message.page)) + return "page: integer expected"; + if (message.limit != null && message.hasOwnProperty("limit")) + if (!$util.isInteger(message.limit)) + return "limit: integer expected"; + return null; + }; + + /** + * Creates a CSGetRankReq message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cs.CSGetRankReq + * @static + * @param {Object.} object Plain object + * @returns {cs.CSGetRankReq} CSGetRankReq + */ + CSGetRankReq.fromObject = function fromObject(object) { + if (object instanceof $root.cs.CSGetRankReq) + return object; + var message = new $root.cs.CSGetRankReq(); + if (object.rankType != null) + message.rankType = object.rankType | 0; + if (object.page != null) + message.page = object.page | 0; + if (object.limit != null) + message.limit = object.limit | 0; + return message; + }; + + /** + * Creates a plain object from a CSGetRankReq message. Also converts values to other types if specified. + * @function toObject + * @memberof cs.CSGetRankReq + * @static + * @param {cs.CSGetRankReq} message CSGetRankReq + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CSGetRankReq.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.rankType = 0; + object.page = 0; + object.limit = 0; + } + if (message.rankType != null && message.hasOwnProperty("rankType")) + object.rankType = message.rankType; + 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 CSGetRankReq to JSON. + * @function toJSON + * @memberof cs.CSGetRankReq + * @instance + * @returns {Object.} JSON object + */ + CSGetRankReq.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CSGetRankReq + * @function getTypeUrl + * @memberof cs.CSGetRankReq + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CSGetRankReq.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/cs.CSGetRankReq"; + }; + + return CSGetRankReq; + })(); + + cs.CSGetRankRes = (function() { + + /** + * Properties of a CSGetRankRes. + * @memberof cs + * @interface ICSGetRankRes + * @property {Array.|null} [girls] CSGetRankRes girls + */ + + /** + * Constructs a new CSGetRankRes. + * @memberof cs + * @classdesc Represents a CSGetRankRes. + * @implements ICSGetRankRes + * @constructor + * @param {cs.ICSGetRankRes=} [properties] Properties to set + */ + function CSGetRankRes(properties) { + this.girls = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CSGetRankRes girls. + * @member {Array.} girls + * @memberof cs.CSGetRankRes + * @instance + */ + CSGetRankRes.prototype.girls = $util.emptyArray; + + /** + * Creates a new CSGetRankRes instance using the specified properties. + * @function create + * @memberof cs.CSGetRankRes + * @static + * @param {cs.ICSGetRankRes=} [properties] Properties to set + * @returns {cs.CSGetRankRes} CSGetRankRes instance + */ + CSGetRankRes.create = function create(properties) { + return new CSGetRankRes(properties); + }; + + /** + * Encodes the specified CSGetRankRes message. Does not implicitly {@link cs.CSGetRankRes.verify|verify} messages. + * @function encode + * @memberof cs.CSGetRankRes + * @static + * @param {cs.ICSGetRankRes} message CSGetRankRes message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CSGetRankRes.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.girls != null && message.girls.length) + for (var i = 0; i < message.girls.length; ++i) + $root.cs.GirlData.encode(message.girls[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CSGetRankRes message, length delimited. Does not implicitly {@link cs.CSGetRankRes.verify|verify} messages. + * @function encodeDelimited + * @memberof cs.CSGetRankRes + * @static + * @param {cs.ICSGetRankRes} message CSGetRankRes message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CSGetRankRes.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CSGetRankRes message from the specified reader or buffer. + * @function decode + * @memberof cs.CSGetRankRes + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cs.CSGetRankRes} CSGetRankRes + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CSGetRankRes.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.CSGetRankRes(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.girls && message.girls.length)) + message.girls = []; + message.girls.push($root.cs.GirlData.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CSGetRankRes message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cs.CSGetRankRes + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cs.CSGetRankRes} CSGetRankRes + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CSGetRankRes.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CSGetRankRes message. + * @function verify + * @memberof cs.CSGetRankRes + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CSGetRankRes.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.girls != null && message.hasOwnProperty("girls")) { + if (!Array.isArray(message.girls)) + return "girls: array expected"; + for (var i = 0; i < message.girls.length; ++i) { + var error = $root.cs.GirlData.verify(message.girls[i]); + if (error) + return "girls." + error; + } + } + return null; + }; + + /** + * Creates a CSGetRankRes message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cs.CSGetRankRes + * @static + * @param {Object.} object Plain object + * @returns {cs.CSGetRankRes} CSGetRankRes + */ + CSGetRankRes.fromObject = function fromObject(object) { + if (object instanceof $root.cs.CSGetRankRes) + return object; + var message = new $root.cs.CSGetRankRes(); + if (object.girls) { + if (!Array.isArray(object.girls)) + throw TypeError(".cs.CSGetRankRes.girls: array expected"); + message.girls = []; + for (var i = 0; i < object.girls.length; ++i) { + if (typeof object.girls[i] !== "object") + throw TypeError(".cs.CSGetRankRes.girls: object expected"); + message.girls[i] = $root.cs.GirlData.fromObject(object.girls[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a CSGetRankRes message. Also converts values to other types if specified. + * @function toObject + * @memberof cs.CSGetRankRes + * @static + * @param {cs.CSGetRankRes} message CSGetRankRes + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CSGetRankRes.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.girls = []; + if (message.girls && message.girls.length) { + object.girls = []; + for (var j = 0; j < message.girls.length; ++j) + object.girls[j] = $root.cs.GirlData.toObject(message.girls[j], options); + } + return object; + }; + + /** + * Converts this CSGetRankRes to JSON. + * @function toJSON + * @memberof cs.CSGetRankRes + * @instance + * @returns {Object.} JSON object + */ + CSGetRankRes.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CSGetRankRes + * @function getTypeUrl + * @memberof cs.CSGetRankRes + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CSGetRankRes.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/cs.CSGetRankRes"; + }; + + return CSGetRankRes; + })(); + + cs.CSViewGirlReq = (function() { + + /** + * Properties of a CSViewGirlReq. + * @memberof cs + * @interface ICSViewGirlReq + * @property {number|null} [girlId] CSViewGirlReq girlId + */ + + /** + * Constructs a new CSViewGirlReq. + * @memberof cs + * @classdesc Represents a CSViewGirlReq. + * @implements ICSViewGirlReq + * @constructor + * @param {cs.ICSViewGirlReq=} [properties] Properties to set + */ + function CSViewGirlReq(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]]; + } + + /** + * CSViewGirlReq girlId. + * @member {number} girlId + * @memberof cs.CSViewGirlReq + * @instance + */ + CSViewGirlReq.prototype.girlId = 0; + + /** + * Creates a new CSViewGirlReq instance using the specified properties. + * @function create + * @memberof cs.CSViewGirlReq + * @static + * @param {cs.ICSViewGirlReq=} [properties] Properties to set + * @returns {cs.CSViewGirlReq} CSViewGirlReq instance + */ + CSViewGirlReq.create = function create(properties) { + return new CSViewGirlReq(properties); + }; + + /** + * Encodes the specified CSViewGirlReq message. Does not implicitly {@link cs.CSViewGirlReq.verify|verify} messages. + * @function encode + * @memberof cs.CSViewGirlReq + * @static + * @param {cs.ICSViewGirlReq} message CSViewGirlReq message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CSViewGirlReq.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.girlId != null && Object.hasOwnProperty.call(message, "girlId")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.girlId); + return writer; + }; + + /** + * Encodes the specified CSViewGirlReq message, length delimited. Does not implicitly {@link cs.CSViewGirlReq.verify|verify} messages. + * @function encodeDelimited + * @memberof cs.CSViewGirlReq + * @static + * @param {cs.ICSViewGirlReq} message CSViewGirlReq message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CSViewGirlReq.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CSViewGirlReq message from the specified reader or buffer. + * @function decode + * @memberof cs.CSViewGirlReq + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cs.CSViewGirlReq} CSViewGirlReq + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CSViewGirlReq.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.CSViewGirlReq(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.girlId = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CSViewGirlReq message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cs.CSViewGirlReq + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cs.CSViewGirlReq} CSViewGirlReq + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CSViewGirlReq.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CSViewGirlReq message. + * @function verify + * @memberof cs.CSViewGirlReq + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CSViewGirlReq.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.girlId != null && message.hasOwnProperty("girlId")) + if (!$util.isInteger(message.girlId)) + return "girlId: integer expected"; + return null; + }; + + /** + * Creates a CSViewGirlReq message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cs.CSViewGirlReq + * @static + * @param {Object.} object Plain object + * @returns {cs.CSViewGirlReq} CSViewGirlReq + */ + CSViewGirlReq.fromObject = function fromObject(object) { + if (object instanceof $root.cs.CSViewGirlReq) + return object; + var message = new $root.cs.CSViewGirlReq(); + if (object.girlId != null) + message.girlId = object.girlId | 0; + return message; + }; + + /** + * Creates a plain object from a CSViewGirlReq message. Also converts values to other types if specified. + * @function toObject + * @memberof cs.CSViewGirlReq + * @static + * @param {cs.CSViewGirlReq} message CSViewGirlReq + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CSViewGirlReq.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.girlId = 0; + if (message.girlId != null && message.hasOwnProperty("girlId")) + object.girlId = message.girlId; + return object; + }; + + /** + * Converts this CSViewGirlReq to JSON. + * @function toJSON + * @memberof cs.CSViewGirlReq + * @instance + * @returns {Object.} JSON object + */ + CSViewGirlReq.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CSViewGirlReq + * @function getTypeUrl + * @memberof cs.CSViewGirlReq + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CSViewGirlReq.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/cs.CSViewGirlReq"; + }; + + return CSViewGirlReq; + })(); + + cs.CSViewGirlRes = (function() { + + /** + * Properties of a CSViewGirlRes. + * @memberof cs + * @interface ICSViewGirlRes + */ + + /** + * Constructs a new CSViewGirlRes. + * @memberof cs + * @classdesc Represents a CSViewGirlRes. + * @implements ICSViewGirlRes + * @constructor + * @param {cs.ICSViewGirlRes=} [properties] Properties to set + */ + function CSViewGirlRes(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 CSViewGirlRes instance using the specified properties. + * @function create + * @memberof cs.CSViewGirlRes + * @static + * @param {cs.ICSViewGirlRes=} [properties] Properties to set + * @returns {cs.CSViewGirlRes} CSViewGirlRes instance + */ + CSViewGirlRes.create = function create(properties) { + return new CSViewGirlRes(properties); + }; + + /** + * Encodes the specified CSViewGirlRes message. Does not implicitly {@link cs.CSViewGirlRes.verify|verify} messages. + * @function encode + * @memberof cs.CSViewGirlRes + * @static + * @param {cs.ICSViewGirlRes} message CSViewGirlRes message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CSViewGirlRes.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified CSViewGirlRes message, length delimited. Does not implicitly {@link cs.CSViewGirlRes.verify|verify} messages. + * @function encodeDelimited + * @memberof cs.CSViewGirlRes + * @static + * @param {cs.ICSViewGirlRes} message CSViewGirlRes message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CSViewGirlRes.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CSViewGirlRes message from the specified reader or buffer. + * @function decode + * @memberof cs.CSViewGirlRes + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cs.CSViewGirlRes} CSViewGirlRes + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CSViewGirlRes.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.CSViewGirlRes(); + 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 CSViewGirlRes message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cs.CSViewGirlRes + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cs.CSViewGirlRes} CSViewGirlRes + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CSViewGirlRes.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CSViewGirlRes message. + * @function verify + * @memberof cs.CSViewGirlRes + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CSViewGirlRes.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a CSViewGirlRes message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cs.CSViewGirlRes + * @static + * @param {Object.} object Plain object + * @returns {cs.CSViewGirlRes} CSViewGirlRes + */ + CSViewGirlRes.fromObject = function fromObject(object) { + if (object instanceof $root.cs.CSViewGirlRes) + return object; + return new $root.cs.CSViewGirlRes(); + }; + + /** + * Creates a plain object from a CSViewGirlRes message. Also converts values to other types if specified. + * @function toObject + * @memberof cs.CSViewGirlRes + * @static + * @param {cs.CSViewGirlRes} message CSViewGirlRes + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CSViewGirlRes.toObject = function toObject() { + return {}; + }; + + /** + * Converts this CSViewGirlRes to JSON. + * @function toJSON + * @memberof cs.CSViewGirlRes + * @instance + * @returns {Object.} JSON object + */ + CSViewGirlRes.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CSViewGirlRes + * @function getTypeUrl + * @memberof cs.CSViewGirlRes + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CSViewGirlRes.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/cs.CSViewGirlRes"; + }; + + return CSViewGirlRes; + })(); + + cs.CSBookmarkReq = (function() { + + /** + * Properties of a CSBookmarkReq. + * @memberof cs + * @interface ICSBookmarkReq + * @property {number|null} [girlId] CSBookmarkReq girlId + * @property {boolean|null} [cancel] CSBookmarkReq cancel + */ + + /** + * Constructs a new CSBookmarkReq. + * @memberof cs + * @classdesc Represents a CSBookmarkReq. + * @implements ICSBookmarkReq + * @constructor + * @param {cs.ICSBookmarkReq=} [properties] Properties to set + */ + function CSBookmarkReq(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]]; + } + + /** + * CSBookmarkReq girlId. + * @member {number} girlId + * @memberof cs.CSBookmarkReq + * @instance + */ + CSBookmarkReq.prototype.girlId = 0; + + /** + * CSBookmarkReq cancel. + * @member {boolean} cancel + * @memberof cs.CSBookmarkReq + * @instance + */ + CSBookmarkReq.prototype.cancel = false; + + /** + * Creates a new CSBookmarkReq instance using the specified properties. + * @function create + * @memberof cs.CSBookmarkReq + * @static + * @param {cs.ICSBookmarkReq=} [properties] Properties to set + * @returns {cs.CSBookmarkReq} CSBookmarkReq instance + */ + CSBookmarkReq.create = function create(properties) { + return new CSBookmarkReq(properties); + }; + + /** + * Encodes the specified CSBookmarkReq message. Does not implicitly {@link cs.CSBookmarkReq.verify|verify} messages. + * @function encode + * @memberof cs.CSBookmarkReq + * @static + * @param {cs.ICSBookmarkReq} message CSBookmarkReq message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CSBookmarkReq.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.girlId != null && Object.hasOwnProperty.call(message, "girlId")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.girlId); + if (message.cancel != null && Object.hasOwnProperty.call(message, "cancel")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.cancel); + return writer; + }; + + /** + * Encodes the specified CSBookmarkReq message, length delimited. Does not implicitly {@link cs.CSBookmarkReq.verify|verify} messages. + * @function encodeDelimited + * @memberof cs.CSBookmarkReq + * @static + * @param {cs.ICSBookmarkReq} message CSBookmarkReq message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CSBookmarkReq.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CSBookmarkReq message from the specified reader or buffer. + * @function decode + * @memberof cs.CSBookmarkReq + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cs.CSBookmarkReq} CSBookmarkReq + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CSBookmarkReq.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.CSBookmarkReq(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.girlId = reader.int32(); + break; + } + case 2: { + message.cancel = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CSBookmarkReq message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cs.CSBookmarkReq + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cs.CSBookmarkReq} CSBookmarkReq + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CSBookmarkReq.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CSBookmarkReq message. + * @function verify + * @memberof cs.CSBookmarkReq + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CSBookmarkReq.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.girlId != null && message.hasOwnProperty("girlId")) + if (!$util.isInteger(message.girlId)) + return "girlId: integer expected"; + if (message.cancel != null && message.hasOwnProperty("cancel")) + if (typeof message.cancel !== "boolean") + return "cancel: boolean expected"; + return null; + }; + + /** + * Creates a CSBookmarkReq message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cs.CSBookmarkReq + * @static + * @param {Object.} object Plain object + * @returns {cs.CSBookmarkReq} CSBookmarkReq + */ + CSBookmarkReq.fromObject = function fromObject(object) { + if (object instanceof $root.cs.CSBookmarkReq) + return object; + var message = new $root.cs.CSBookmarkReq(); + if (object.girlId != null) + message.girlId = object.girlId | 0; + if (object.cancel != null) + message.cancel = Boolean(object.cancel); + return message; + }; + + /** + * Creates a plain object from a CSBookmarkReq message. Also converts values to other types if specified. + * @function toObject + * @memberof cs.CSBookmarkReq + * @static + * @param {cs.CSBookmarkReq} message CSBookmarkReq + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CSBookmarkReq.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.girlId = 0; + object.cancel = false; + } + if (message.girlId != null && message.hasOwnProperty("girlId")) + object.girlId = message.girlId; + if (message.cancel != null && message.hasOwnProperty("cancel")) + object.cancel = message.cancel; + return object; + }; + + /** + * Converts this CSBookmarkReq to JSON. + * @function toJSON + * @memberof cs.CSBookmarkReq + * @instance + * @returns {Object.} JSON object + */ + CSBookmarkReq.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CSBookmarkReq + * @function getTypeUrl + * @memberof cs.CSBookmarkReq + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CSBookmarkReq.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/cs.CSBookmarkReq"; + }; + + return CSBookmarkReq; + })(); + + cs.CSBookmarkRes = (function() { + + /** + * Properties of a CSBookmarkRes. + * @memberof cs + * @interface ICSBookmarkRes + */ + + /** + * Constructs a new CSBookmarkRes. + * @memberof cs + * @classdesc Represents a CSBookmarkRes. + * @implements ICSBookmarkRes + * @constructor + * @param {cs.ICSBookmarkRes=} [properties] Properties to set + */ + function CSBookmarkRes(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 CSBookmarkRes instance using the specified properties. + * @function create + * @memberof cs.CSBookmarkRes + * @static + * @param {cs.ICSBookmarkRes=} [properties] Properties to set + * @returns {cs.CSBookmarkRes} CSBookmarkRes instance + */ + CSBookmarkRes.create = function create(properties) { + return new CSBookmarkRes(properties); + }; + + /** + * Encodes the specified CSBookmarkRes message. Does not implicitly {@link cs.CSBookmarkRes.verify|verify} messages. + * @function encode + * @memberof cs.CSBookmarkRes + * @static + * @param {cs.ICSBookmarkRes} message CSBookmarkRes message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CSBookmarkRes.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified CSBookmarkRes message, length delimited. Does not implicitly {@link cs.CSBookmarkRes.verify|verify} messages. + * @function encodeDelimited + * @memberof cs.CSBookmarkRes + * @static + * @param {cs.ICSBookmarkRes} message CSBookmarkRes message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CSBookmarkRes.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CSBookmarkRes message from the specified reader or buffer. + * @function decode + * @memberof cs.CSBookmarkRes + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cs.CSBookmarkRes} CSBookmarkRes + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CSBookmarkRes.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.CSBookmarkRes(); + 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 CSBookmarkRes message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cs.CSBookmarkRes + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cs.CSBookmarkRes} CSBookmarkRes + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CSBookmarkRes.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CSBookmarkRes message. + * @function verify + * @memberof cs.CSBookmarkRes + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CSBookmarkRes.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a CSBookmarkRes message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cs.CSBookmarkRes + * @static + * @param {Object.} object Plain object + * @returns {cs.CSBookmarkRes} CSBookmarkRes + */ + CSBookmarkRes.fromObject = function fromObject(object) { + if (object instanceof $root.cs.CSBookmarkRes) + return object; + return new $root.cs.CSBookmarkRes(); + }; + + /** + * Creates a plain object from a CSBookmarkRes message. Also converts values to other types if specified. + * @function toObject + * @memberof cs.CSBookmarkRes + * @static + * @param {cs.CSBookmarkRes} message CSBookmarkRes + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CSBookmarkRes.toObject = function toObject() { + return {}; + }; + + /** + * Converts this CSBookmarkRes to JSON. + * @function toJSON + * @memberof cs.CSBookmarkRes + * @instance + * @returns {Object.} JSON object + */ + CSBookmarkRes.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CSBookmarkRes + * @function getTypeUrl + * @memberof cs.CSBookmarkRes + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CSBookmarkRes.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/cs.CSBookmarkRes"; + }; + + return CSBookmarkRes; + })(); + + cs.CSGetBookmarkReq = (function() { + + /** + * Properties of a CSGetBookmarkReq. + * @memberof cs + * @interface ICSGetBookmarkReq + * @property {number|null} [page] CSGetBookmarkReq page + * @property {number|null} [limit] CSGetBookmarkReq limit + */ + + /** + * Constructs a new CSGetBookmarkReq. + * @memberof cs + * @classdesc Represents a CSGetBookmarkReq. + * @implements ICSGetBookmarkReq + * @constructor + * @param {cs.ICSGetBookmarkReq=} [properties] Properties to set + */ + function CSGetBookmarkReq(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]]; + } + + /** + * CSGetBookmarkReq page. + * @member {number} page + * @memberof cs.CSGetBookmarkReq + * @instance + */ + CSGetBookmarkReq.prototype.page = 0; + + /** + * CSGetBookmarkReq limit. + * @member {number} limit + * @memberof cs.CSGetBookmarkReq + * @instance + */ + CSGetBookmarkReq.prototype.limit = 0; + + /** + * Creates a new CSGetBookmarkReq instance using the specified properties. + * @function create + * @memberof cs.CSGetBookmarkReq + * @static + * @param {cs.ICSGetBookmarkReq=} [properties] Properties to set + * @returns {cs.CSGetBookmarkReq} CSGetBookmarkReq instance + */ + CSGetBookmarkReq.create = function create(properties) { + return new CSGetBookmarkReq(properties); + }; + + /** + * Encodes the specified CSGetBookmarkReq message. Does not implicitly {@link cs.CSGetBookmarkReq.verify|verify} messages. + * @function encode + * @memberof cs.CSGetBookmarkReq + * @static + * @param {cs.ICSGetBookmarkReq} message CSGetBookmarkReq message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CSGetBookmarkReq.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 CSGetBookmarkReq message, length delimited. Does not implicitly {@link cs.CSGetBookmarkReq.verify|verify} messages. + * @function encodeDelimited + * @memberof cs.CSGetBookmarkReq + * @static + * @param {cs.ICSGetBookmarkReq} message CSGetBookmarkReq message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CSGetBookmarkReq.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CSGetBookmarkReq message from the specified reader or buffer. + * @function decode + * @memberof cs.CSGetBookmarkReq + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cs.CSGetBookmarkReq} CSGetBookmarkReq + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CSGetBookmarkReq.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.CSGetBookmarkReq(); + 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 CSGetBookmarkReq message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cs.CSGetBookmarkReq + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cs.CSGetBookmarkReq} CSGetBookmarkReq + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CSGetBookmarkReq.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CSGetBookmarkReq message. + * @function verify + * @memberof cs.CSGetBookmarkReq + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CSGetBookmarkReq.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 CSGetBookmarkReq message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cs.CSGetBookmarkReq + * @static + * @param {Object.} object Plain object + * @returns {cs.CSGetBookmarkReq} CSGetBookmarkReq + */ + CSGetBookmarkReq.fromObject = function fromObject(object) { + if (object instanceof $root.cs.CSGetBookmarkReq) + return object; + var message = new $root.cs.CSGetBookmarkReq(); + 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 CSGetBookmarkReq message. Also converts values to other types if specified. + * @function toObject + * @memberof cs.CSGetBookmarkReq + * @static + * @param {cs.CSGetBookmarkReq} message CSGetBookmarkReq + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CSGetBookmarkReq.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 CSGetBookmarkReq to JSON. + * @function toJSON + * @memberof cs.CSGetBookmarkReq + * @instance + * @returns {Object.} JSON object + */ + CSGetBookmarkReq.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CSGetBookmarkReq + * @function getTypeUrl + * @memberof cs.CSGetBookmarkReq + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CSGetBookmarkReq.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/cs.CSGetBookmarkReq"; + }; + + return CSGetBookmarkReq; + })(); + + cs.CSGetBookmarkRes = (function() { + + /** + * Properties of a CSGetBookmarkRes. + * @memberof cs + * @interface ICSGetBookmarkRes + * @property {Array.|null} [girls] CSGetBookmarkRes girls + */ + + /** + * Constructs a new CSGetBookmarkRes. + * @memberof cs + * @classdesc Represents a CSGetBookmarkRes. + * @implements ICSGetBookmarkRes + * @constructor + * @param {cs.ICSGetBookmarkRes=} [properties] Properties to set + */ + function CSGetBookmarkRes(properties) { + this.girls = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CSGetBookmarkRes girls. + * @member {Array.} girls + * @memberof cs.CSGetBookmarkRes + * @instance + */ + CSGetBookmarkRes.prototype.girls = $util.emptyArray; + + /** + * Creates a new CSGetBookmarkRes instance using the specified properties. + * @function create + * @memberof cs.CSGetBookmarkRes + * @static + * @param {cs.ICSGetBookmarkRes=} [properties] Properties to set + * @returns {cs.CSGetBookmarkRes} CSGetBookmarkRes instance + */ + CSGetBookmarkRes.create = function create(properties) { + return new CSGetBookmarkRes(properties); + }; + + /** + * Encodes the specified CSGetBookmarkRes message. Does not implicitly {@link cs.CSGetBookmarkRes.verify|verify} messages. + * @function encode + * @memberof cs.CSGetBookmarkRes + * @static + * @param {cs.ICSGetBookmarkRes} message CSGetBookmarkRes message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CSGetBookmarkRes.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.girls != null && message.girls.length) + for (var i = 0; i < message.girls.length; ++i) + $root.cs.GirlData.encode(message.girls[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CSGetBookmarkRes message, length delimited. Does not implicitly {@link cs.CSGetBookmarkRes.verify|verify} messages. + * @function encodeDelimited + * @memberof cs.CSGetBookmarkRes + * @static + * @param {cs.ICSGetBookmarkRes} message CSGetBookmarkRes message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CSGetBookmarkRes.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CSGetBookmarkRes message from the specified reader or buffer. + * @function decode + * @memberof cs.CSGetBookmarkRes + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cs.CSGetBookmarkRes} CSGetBookmarkRes + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CSGetBookmarkRes.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.CSGetBookmarkRes(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.girls && message.girls.length)) + message.girls = []; + message.girls.push($root.cs.GirlData.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CSGetBookmarkRes message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cs.CSGetBookmarkRes + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cs.CSGetBookmarkRes} CSGetBookmarkRes + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CSGetBookmarkRes.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CSGetBookmarkRes message. + * @function verify + * @memberof cs.CSGetBookmarkRes + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CSGetBookmarkRes.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.girls != null && message.hasOwnProperty("girls")) { + if (!Array.isArray(message.girls)) + return "girls: array expected"; + for (var i = 0; i < message.girls.length; ++i) { + var error = $root.cs.GirlData.verify(message.girls[i]); + if (error) + return "girls." + error; + } + } + return null; + }; + + /** + * Creates a CSGetBookmarkRes message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cs.CSGetBookmarkRes + * @static + * @param {Object.} object Plain object + * @returns {cs.CSGetBookmarkRes} CSGetBookmarkRes + */ + CSGetBookmarkRes.fromObject = function fromObject(object) { + if (object instanceof $root.cs.CSGetBookmarkRes) + return object; + var message = new $root.cs.CSGetBookmarkRes(); + if (object.girls) { + if (!Array.isArray(object.girls)) + throw TypeError(".cs.CSGetBookmarkRes.girls: array expected"); + message.girls = []; + for (var i = 0; i < object.girls.length; ++i) { + if (typeof object.girls[i] !== "object") + throw TypeError(".cs.CSGetBookmarkRes.girls: object expected"); + message.girls[i] = $root.cs.GirlData.fromObject(object.girls[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a CSGetBookmarkRes message. Also converts values to other types if specified. + * @function toObject + * @memberof cs.CSGetBookmarkRes + * @static + * @param {cs.CSGetBookmarkRes} message CSGetBookmarkRes + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CSGetBookmarkRes.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.girls = []; + if (message.girls && message.girls.length) { + object.girls = []; + for (var j = 0; j < message.girls.length; ++j) + object.girls[j] = $root.cs.GirlData.toObject(message.girls[j], options); + } + return object; + }; + + /** + * Converts this CSGetBookmarkRes to JSON. + * @function toJSON + * @memberof cs.CSGetBookmarkRes + * @instance + * @returns {Object.} JSON object + */ + CSGetBookmarkRes.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CSGetBookmarkRes + * @function getTypeUrl + * @memberof cs.CSGetBookmarkRes + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CSGetBookmarkRes.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/cs.CSGetBookmarkRes"; + }; + + return CSGetBookmarkRes; + })(); + /** * Category enum. * @name cs.Category diff --git a/proto_cs b/proto_cs index 61bae4db..f58de107 160000 --- a/proto_cs +++ b/proto_cs @@ -1 +1 @@ -Subproject commit 61bae4db5abb87f2770cf639ab0980cecc1d2c31 +Subproject commit f58de107c5659cdf183c97932e288e2e3a892f90